feat: summarize with gemma4:26b using converged prompt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mortdecai
2026-06-07 13:17:28 -04:00
parent f19c04bdc1
commit fa580ec936
3 changed files with 143 additions and 4 deletions
+5 -3
View File
@@ -169,10 +169,12 @@ def summarize_news(items, count=5, length="30-50 words"):
for i, item in enumerate(candidates)
])
prompt_summary = (
"You are a professional news editor. Write a daily briefing.\n"
f"For EACH article, write a concise summary ({length}).\n"
"You are a professional news editor writing a daily briefing for a "
"receipt printer.\n"
f"For EACH article, write a concise factual summary ({length}).\n"
"No preamble, no opinion, do not write \"this article\".\n"
"LANGUAGE RULE: Use English. Translate non-English/Spanish articles.\n"
"Return STRICTLY as a JSON list: [{\"id\": 0, \"summary\": \"...\"}, ...]\n\n"
"Return STRICTLY a JSON list: [{\"id\": 0, \"summary\": \"...\"}, ...]\n\n"
f"CONTENT:\n{content_input}"
)
try: