From f334994ab6ecab238b14e95420d1a069972ea85c Mon Sep 17 00:00:00 2001 From: Liang Jiaqing Date: Fri, 24 Apr 2026 09:29:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20thinking=E9=9D=9E=E7=A9=BA=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E8=AF=AF=E5=88=A4=E4=B8=BA=E7=A9=BA=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E8=A7=A6=E5=8F=91=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ga.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ga.py b/ga.py index 0aa87a0..869f8ee 100644 --- a/ga.py +++ b/ga.py @@ -441,7 +441,8 @@ class GenericAgentHandler(BaseHandler): 当模型在一轮中未显式调用任何工具时,由引擎自动触发。 二次确认仅在回复几乎只包含/和一段大代码块时触发。''' content = getattr(response, 'content', '') or "" - if not response or not content.strip(): + thinking = getattr(response, 'thinking', '') or "" + if not response or (not content.strip() and not thinking.strip()): yield "[Warn] LLM returned an empty response. Retrying...\n" return StepOutcome({}, next_prompt="[System] Blank response, regenerate and tooluse") if len(content) > 100 and ('未收到完整响应 !!!]' in content[-100:] or '!!!Error: [SSL:' in content[-100:]):