fix: gemini ReAct (#2132)
This commit is contained in:
@@ -226,6 +226,8 @@ function M:add_text_message(ctx, text, state, opts)
|
||||
if llm_tool_names == nil then llm_tool_names = LlmTools.get_tool_names() end
|
||||
if ctx.content == nil then ctx.content = "" end
|
||||
ctx.content = ctx.content .. text
|
||||
local content = ctx.content:gsub("<tool_code>", ""):gsub("</tool_code>", "")
|
||||
ctx.content = content
|
||||
local msg = HistoryMessage:new({
|
||||
role = "assistant",
|
||||
content = ctx.content,
|
||||
|
||||
Reference in New Issue
Block a user