feat: add add_file_to_context tool (#1191)

This commit is contained in:
yetone
2025-02-06 16:00:14 +08:00
committed by GitHub
parent 4f41154e83
commit f2bd4adba4
4 changed files with 88 additions and 25 deletions

View File

@@ -146,7 +146,7 @@ M._stream = function(opts)
on_chunk = opts.on_chunk,
on_stop = function(stop_opts)
if stop_opts.reason == "tool_use" and stop_opts.tool_use then
local result, error = LLMTools.process_tool_use(stop_opts.tool_use, opts.on_tool_log)
local result, error = LLMTools.process_tool_use(opts.tools, stop_opts.tool_use, opts.on_tool_log)
local tool_result = {
tool_use_id = stop_opts.tool_use.id,
content = error ~= nil and error or result,