Add topic callers, town knowledge, dynamic response lengths
- 30% of callers now call about topics (prestige TV, science, poker, astrophotography, physics, tech, US news) instead of personal problems - 86 curated interests weighted toward shows like Severance, Breaking Bad, The Wire, LOST, Westworld, etc. Removed reality TV/celebrity gossip - 32-town knowledge base with real facts so callers don't invent landmarks - Smart topic detection for news enrichment (keyword->search query mapping) - Enrichment now summarizes articles naturally via LLM instead of quoting headlines - Prompt rewrite for varied response lengths and no rehashing - Extra weight for Animas and Lordsburg callers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ class NewsItem:
|
||||
title: str
|
||||
source: str
|
||||
published: str
|
||||
content: str = ""
|
||||
|
||||
|
||||
class NewsService:
|
||||
@@ -88,7 +89,8 @@ class NewsService:
|
||||
engines = result.get("engines", [])
|
||||
source = engines[0] if engines else ""
|
||||
published = result.get("publishedDate", "")
|
||||
items.append(NewsItem(title=title, source=source, published=published))
|
||||
content = result.get("content", "").strip()
|
||||
items.append(NewsItem(title=title, source=source, published=published, content=content))
|
||||
return items
|
||||
|
||||
def format_headlines_for_prompt(self, items: list[NewsItem]) -> str:
|
||||
|
||||
Reference in New Issue
Block a user