remove: 去掉今日定调摘要(prompt不再生成、前端移除高亮框、空标题卡不渲染)
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import re
|
||||
import traceback
|
||||
|
||||
import httpx
|
||||
@@ -80,8 +79,7 @@ DAILY_ANALYSIS_PROMPT = """请对 {trade_date} 的A股市场进行收盘分析
|
||||
REPORT_PARTS = [
|
||||
"""现在写报告的【第1部分】,只输出这一部分,直接输出 Markdown,不要任何开场白或说明:
|
||||
1. 以 `# {title} A股收盘分析报告` 一级标题开头
|
||||
2. 标题后第一行输出定调引用块,格式严格为:`> 今日定调:<80字内核心结论,含1-2个关键数字>`
|
||||
3. 写 `## 一、市场总览`(指数表格、涨跌统计须环比、市场温度)与 `## 二、题材热点分析`(涨幅前5、持续活跃、新兴热点、退潮警示、板块主力资金流TOP3)
|
||||
2. 写 `## 一、市场总览`(指数表格、涨跌统计须环比、市场温度)与 `## 二、题材热点分析`(涨幅前5、持续活跃、新兴热点、退潮警示、板块主力资金流TOP3)
|
||||
全文控制在1600字以内。""",
|
||||
"""现在写报告的【第2部分】,只输出这一部分,直接输出 Markdown,不要重复之前内容:
|
||||
- `## 三、核心股追踪`(连板梯队完整表格:层级/股票/涨停原因/封单,首板挑3-5只人气股点评;核心股表现;龙头辨识)
|
||||
@@ -95,8 +93,6 @@ REPORT_PARTS = [
|
||||
全文控制在1900字以内。""",
|
||||
]
|
||||
|
||||
# 报告头部的"今日定调"引用行,保存时提取为 summary
|
||||
_TONE_LINE_RE = re.compile(r"^>\s*今日定调[::]\s*(.+)$", re.MULTILINE)
|
||||
|
||||
|
||||
async def _consume_sse(resp: httpx.Response) -> dict:
|
||||
@@ -302,13 +298,8 @@ async def collect_ai_analysis(trade_date: str) -> dict:
|
||||
|
||||
|
||||
def _extract_summary(content: str) -> str:
|
||||
"""提取报告头部的"今日定调"引用行作为摘要;缺失时退回正文截断"""
|
||||
match = _TONE_LINE_RE.search(content or "")
|
||||
if match:
|
||||
text = match.group(1).strip()
|
||||
if text:
|
||||
return text[:200]
|
||||
return (content or "")[:200].replace("\n", " ")
|
||||
"""摘要:正文截断前200字(供管理列表展示)"""
|
||||
return (content or "")[:200].replace("\n", " ").strip()
|
||||
|
||||
|
||||
def _num(v) -> str:
|
||||
|
||||
Reference in New Issue
Block a user