diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index f25d6b65..acd74f5d 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -16,7 +16,7 @@ from datetime import datetime # ── 共享 LLM 客户端 + DB 工具(profile-scripts 硬链到同目录)── sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, "/home/hmo/MoFin") -from llm_client import call_llm, REASSESS_MODEL, gateway_alive, ocg_alive +from llm_client import call_llm, REASSESS_MODEL, FALLBACK_MODEL, gateway_alive, ocg_alive from mofin_db import snapshot_strategy_history, sync_recommend_tag DB = "/home/hmo/MoFin/data/mofin.db" @@ -429,8 +429,7 @@ def process_stock(code, force_today=False): # ── 截断保护:输出过短且无信号 = 低质输出,升级 pro 重试一次 ── if not parsed.get("signal") and len(full_text) < 1500: print(f" ⚠️ 输出截断({len(full_text)}字)且无信号,升级 {FALLBACK_MODEL} 重试...", flush=True) - from llm_client import FALLBACK_MODEL as _FBM - result2 = call_llm(prompt, model=_FBM, max_tokens=4096) + result2 = call_llm(prompt, model=FALLBACK_MODEL, max_tokens=4096) if result2["ok"] and len((result2.get("content") or "").strip()) > len(full_text): full_text = result2["content"] parsed = parse_response(full_text)