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 教训)