fix(prompt): 修复_sector_extra未定义(行业强度注入)
This commit is contained in:
@@ -447,6 +447,13 @@ def build_prompt(data):
|
||||
f"(是否建仓/什么价位建仓/仓位多大),禁止假设我有浮盈、"
|
||||
f"禁止出现「已持仓者」视角的建议。")
|
||||
|
||||
# ── 行业强度数据 ──
|
||||
_sector_extra = ""
|
||||
if data.get("sector_change_pct") is not None:
|
||||
_sector_extra = f" 行业涨跌={data['sector_change_pct']}%"
|
||||
if data.get("sector_rank") is not None:
|
||||
_sector_extra += f" 行业排名={data['sector_rank']}"
|
||||
|
||||
_tech_parts = []
|
||||
if data.get("ta_strong_support"):
|
||||
_tech_parts.append(f"强支撑={data['ta_strong_support']} 弱支撑={data['ta_weak_support']} 枢轴={data['ta_pivot']} 弱压={data['ta_weak_resist']} 强压={data['ta_strong_resist']}")
|
||||
|
||||
Reference in New Issue
Block a user