fix: skip ERROR results for tc count; remove debug yield
This commit is contained in:
parent
744f8f6aa0
commit
e558bad2c9
@ -128,8 +128,6 @@ class AgentExecutor:
|
||||
# 5b. LLM 调用
|
||||
raw = await self._call_llm()
|
||||
|
||||
yield "DEBUG_RAW turn=" + str(self._turn_count) + " len=" + str(len(raw) if raw else 0) + "\n"
|
||||
|
||||
# 5c. 解析 LLM 输出
|
||||
actions = self._parse_actions(raw)
|
||||
|
||||
@ -190,7 +188,7 @@ class AgentExecutor:
|
||||
}, ensure_ascii=False) + "\n"
|
||||
|
||||
result = await self._execute_tool(tool_name, tool_params)
|
||||
if not result.startswith("未知工具"):
|
||||
if not result.startswith("未知工具") and not result.startswith("ERROR"):
|
||||
self._tool_call_count += 1
|
||||
|
||||
yield json.dumps({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user