feat: ReAct tool calling (#2104)

This commit is contained in:
yetone
2025-05-31 08:53:34 +08:00
committed by GitHub
parent 22418bff8b
commit bc403ddcbf
25 changed files with 1358 additions and 188 deletions

View File

@@ -1,8 +1,4 @@
local Path = require("plenary.path")
local Utils = require("avante.utils")
local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
local Diff = require("avante.diff")
local Config = require("avante.config")
---@class AvanteLLMTool
@@ -13,6 +9,7 @@ M.name = "str_replace"
M.description =
"The str_replace tool allows you to replace a specific string in a file with a new string. This is used for making precise edits."
-- function M.enabled() return Config.provider:match("ollama") ~= nil end
function M.enabled() return false end
---@type AvanteLLMToolParam
@@ -35,6 +32,11 @@ M.param = {
type = "string",
},
},
usage = {
path = "File path here",
old_str = "old str here",
new_str = "new str here",
},
}
---@type AvanteLLMToolReturn[]