feat: AI分析第三档——海外期货章节、报告分卡片渲染、红绿着色、期号;LLM改流式+分段生成绕开网关120s超时
This commit is contained in:
@@ -43,8 +43,11 @@ def _can_trigger(trade_date: str) -> tuple[bool, str]:
|
||||
async def get_latest_report():
|
||||
conn = get_connection()
|
||||
try:
|
||||
# issue_number:按报告日期序数作为总期号
|
||||
row = conn.execute(
|
||||
"SELECT * FROM ai_reports ORDER BY trade_date DESC, id DESC LIMIT 1"
|
||||
"""SELECT r.*,
|
||||
(SELECT COUNT(*) FROM ai_reports WHERE trade_date <= r.trade_date) AS issue_number
|
||||
FROM ai_reports r ORDER BY r.trade_date DESC, r.id DESC LIMIT 1"""
|
||||
).fetchone()
|
||||
if not row:
|
||||
raise HTTPException(status_code=404, detail="暂无分析报告")
|
||||
|
||||
Reference in New Issue
Block a user