From e558bad2c961db31eea3d3e4f5c49cce6a64ea91 Mon Sep 17 00:00:00 2001 From: ymq Date: Tue, 11 Aug 2026 13:19:03 +0800 Subject: [PATCH] fix: skip ERROR results for tc count; remove debug yield --- pipeline_service/agent_loop_v2.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pipeline_service/agent_loop_v2.py b/pipeline_service/agent_loop_v2.py index 49ab95f..f197ff1 100644 --- a/pipeline_service/agent_loop_v2.py +++ b/pipeline_service/agent_loop_v2.py @@ -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({