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
+137
View File
@@ -0,0 +1,137 @@
{
"version": "1.5.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
},
{
"name": "AWSKeyDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"name": "Base64HighEntropyString",
"limit": 4.5
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "DiscordBotTokenDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"name": "GitLabTokenDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "IPPublicDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "KeywordDetector",
"keyword_exclude": ""
},
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "OpenAIDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "PypiTokenDetector"
},
{
"name": "SendGridDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TelegramBotTokenDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"filters_used": [
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
{
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
},
{
"path": "detect_secrets.filters.heuristic.is_lock_file"
},
{
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
},
{
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
},
{
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
},
{
"path": "detect_secrets.filters.heuristic.is_sequential_string"
},
{
"path": "detect_secrets.filters.heuristic.is_swagger_file"
},
{
"path": "detect_secrets.filters.heuristic.is_templated_secret"
}
],
"results": {
"config.example.json": [
{
"type": "Secret Keyword",
"filename": "config.example.json",
"hashed_secret": "8dd3bcd07c9ee927e6921c98b4dc6e94e2cc10a9",
"is_verified": false,
"line_number": 4
}
]
},
"generated_at": "2026-06-07T17:17:24Z"
}
+1 -1
View File
@@ -3,7 +3,7 @@
"freshrss_user": "your-username", "freshrss_user": "your-username",
"freshrss_api_key": "your-api-password", "freshrss_api_key": "your-api-password",
"ollama_url": "http://your-ollama-ip:11434", "ollama_url": "http://your-ollama-ip:11434",
"ollama_model": "qwen2.5:1.5b", "ollama_model": "gemma4:26b",
"yourls_url": "http://your-yourls-ip/yourls-api.php", "yourls_url": "http://your-yourls-ip/yourls-api.php",
"yourls_user": "yourls-username", "yourls_user": "yourls-username",
"yourls_pass": "yourls-password", "yourls_pass": "yourls-password",
+5 -3
View File
@@ -169,10 +169,12 @@ def summarize_news(items, count=5, length="30-50 words"):
for i, item in enumerate(candidates) for i, item in enumerate(candidates)
]) ])
prompt_summary = ( prompt_summary = (
"You are a professional news editor. Write a daily briefing.\n" "You are a professional news editor writing a daily briefing for a "
f"For EACH article, write a concise summary ({length}).\n" "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" "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}" f"CONTENT:\n{content_input}"
) )
try: try: