fix: gemini ReAct (#2132)
This commit is contained in:
@@ -1424,6 +1424,16 @@ function M.get_tool_use_message(message, messages)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@param tool_use AvanteLLMToolUse
|
||||
function M.tool_use_to_xml(tool_use)
|
||||
local xml = string.format("<%s>\n", tool_use.name)
|
||||
for k, v in pairs(tool_use.input or {}) do
|
||||
xml = xml .. string.format("<%s>%s</%s>\n", k, tostring(v), k)
|
||||
end
|
||||
xml = xml .. "</" .. tool_use.name .. ">"
|
||||
return xml
|
||||
end
|
||||
|
||||
---@param tool_use AvanteLLMToolUse
|
||||
function M.is_replace_func_call_tool_use(tool_use)
|
||||
local is_replace_func_call = false
|
||||
|
||||
Reference in New Issue
Block a user