From 01a60653f81ec87333d4e3758f9514ecec5c8839 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 18 Aug 2026 11:06:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20parse=5Fresponse=E4=B9=B0=E5=85=A5?= =?UTF-8?q?=E5=8C=BA0.0~0.0=E8=A7=86=E4=B8=BAzone=5Fcleared(elif)=E2=80=94?= =?UTF-8?q?=E2=80=94=E6=B8=85=E7=A9=BA=E8=84=8F=E5=80=BC=E4=B8=8D=E6=AE=8B?= =?UTF-8?q?=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/batch_reassess.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index 2c7431ac..647c6f66 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -458,12 +458,9 @@ def parse_response(text): if zl: if re.search(r'】\s*(无|不设|不参与|空仓)', zl): result["zone_cleared"] = True - else: - # 2026-08-18 修复:LLM 输出"买入区0.0~0.0"也视为 zone_cleared(清空) - # 否则 parse 得 0/0 → 区间条件不成立 → 旧脏值(如95/99)残留(600262 教训) - _zero_nums = re.findall(r'\d+\.?\d*', zl) - if len(_zero_nums) >= 2 and all(float(n) <= 0.01 for n in _zero_nums[:2]): - result["zone_cleared"] = True + elif len(re.findall(r'\d+\.?\d*', zl)) >= 2 and all(float(n) <= 0.01 for n in re.findall(r'\d+\.?\d*', zl)[:2]): + # 2026-08-18 修复:LLM 输出"买入区0.0~0.0"也视为 zone_cleared(清空脏值) + result["zone_cleared"] = True else: # 2026-08-18 修复:LLM 说"95~99(异常,应为14.87~15.01)"时,取"应为"后的正确区间 # 否则取前两个数字(避免旧脏值被当推荐值写回,老莫 600262 教训)