fix: don't count unknown tool calls toward tool_call_count
This commit is contained in:
parent
91dabd7b4c
commit
92af7603e0
@ -185,7 +185,8 @@ class AgentExecutor:
|
||||
}, ensure_ascii=False) + "\n"
|
||||
|
||||
result = await self._execute_tool(tool_name, tool_params)
|
||||
self._tool_call_count += 1
|
||||
if not result.startswith("未知工具"):
|
||||
self._tool_call_count += 1
|
||||
|
||||
yield json.dumps({
|
||||
"type": "tool_result", "tool": tool_name,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user