feat: 23:00 daily news recap; prompts drop futures
Summarizer still runs the 15-min analyst, plus a 24h breaking-news recap at 23:00 America/New_York. HUD pins kind=daily_recap. Prompts ignore futures/market tape.
This commit is contained in:
parent
d25ca8ed9c
commit
49ee5fe7a3
16 changed files with 431 additions and 75 deletions
|
|
@ -1220,22 +1220,31 @@ async def list_news_summaries(
|
|||
None,
|
||||
description="Only summaries generated at/after this UTC instant.",
|
||||
),
|
||||
kind: str | None = Query(
|
||||
None,
|
||||
description="Filter: interval or daily_recap. Omit for all.",
|
||||
),
|
||||
limit: int = Query(20, ge=1, le=100),
|
||||
offset: int = Query(0, ge=0),
|
||||
):
|
||||
"""Most recent master LLM summaries (newest first)."""
|
||||
if kind is not None and kind not in ("interval", "daily_recap"):
|
||||
raise HTTPException(422, "kind must be interval or daily_recap")
|
||||
async with async_session() as session:
|
||||
stmt = select(article_summaries).order_by(
|
||||
article_summaries.c.batch_timestamp.desc().nullslast()
|
||||
)
|
||||
if since:
|
||||
stmt = stmt.where(article_summaries.c.batch_timestamp >= since)
|
||||
if kind is not None:
|
||||
stmt = stmt.where(article_summaries.c.kind == kind)
|
||||
stmt = stmt.limit(limit).offset(offset)
|
||||
rows = (await session.execute(stmt)).mappings().all()
|
||||
return [
|
||||
NewsSummaryOut(
|
||||
id=r["id"], summary_text=r["summary_text"],
|
||||
batch_timestamp=r["batch_timestamp"], model=r["model"],
|
||||
kind=r["kind"],
|
||||
)
|
||||
for r in rows
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue