fix: 代码降级分析也加时间标注+LLM路径日志改为12维
This commit is contained in:
@@ -144,14 +144,14 @@ def _build_full_analysis(code, entry, result):
|
||||
lines.append(f"【{name}({code} 九维全析)】")
|
||||
lines.append("")
|
||||
if macro_desc:
|
||||
lines.append(f"① 大盘环境:{macro_desc}")
|
||||
lines.append(f"① 大盘环境(当日实时):{macro_desc}")
|
||||
else:
|
||||
lines.append(f"① 大盘环境:数据待刷新")
|
||||
lines.append(f"① 大盘环境(当日实时):数据待刷新")
|
||||
if pe_val or pb_val:
|
||||
lines.append(f"② 个股基本面:{pe_val} {pb_val}")
|
||||
lines.append(f"② 个股基本面(最新财报):{pe_val} {pb_val}")
|
||||
else:
|
||||
lines.append(f"② 个股基本面:数据待补充")
|
||||
lines.append(f"③ 技术面:MA5={ma5} MA10={ma10} MA20={ma20} MA60={ma60}")
|
||||
lines.append(f"② 个股基本面(最新财报):数据待补充")
|
||||
lines.append(f"③ 技术面(MA5/10/20/60日 支撑阻力近20日):MA5={ma5} MA10={ma10} MA20={ma20} MA60={ma60}")
|
||||
if el and eh and price > 0:
|
||||
pos = "在买入区内" if el <= price <= eh else (f"低于买入区{(1-price/el)*100:.0f}%" if price < el else f"高于买入区{(price/eh-1)*100:.0f}%")
|
||||
lines.append(f"④ 价格位置:{price} {pos} 区间{el}~{eh}")
|
||||
@@ -455,7 +455,7 @@ def main():
|
||||
_resp = _ur.build_opener(_ur.ProxyHandler({})).open(_req, timeout=300)
|
||||
_llm_out = __import__('json').loads(_resp.read().decode())["choices"][0]["message"]["content"]
|
||||
_full_analysis_text = _llm_out
|
||||
print(f" ✅ LLM九维分析完成({len(_full_analysis_text)}字)", flush=True)
|
||||
print(f" ✅ LLM12维分析完成({len(_full_analysis_text)}字)", flush=True)
|
||||
except Exception as _e:
|
||||
print(f" LLM调用失败: {_e},使用代码降级", file=__import__('sys').stderr)
|
||||
_full_analysis_text = _build_full_analysis(code, entry, result)
|
||||
|
||||
Reference in New Issue
Block a user