使Tool支持读取配置文件,优化了开始执行工具调用时的日志输出

This commit is contained in:
Windpicker-owo
2025-08-06 12:01:31 +08:00
parent c7ac95b9f8
commit 94a66bd235
3 changed files with 38 additions and 4 deletions

View File

@@ -148,8 +148,11 @@ class ToolExecutor:
if not tool_calls:
logger.debug(f"{self.log_prefix}无需执行工具")
return [], []
logger.info(f"{self.log_prefix}开始执行工具调用: {tool_calls}")
# 提取tool_calls中的函数名称
func_names = [call.func_name for call in tool_calls if call.func_name]
logger.info(f"{self.log_prefix}开始执行工具调用: {func_names}")
# 执行每个工具调用
for tool_call in tool_calls: