Feature: Add structured logging for each LLM-generated article summary

This commit is contained in:
Jeffrey Paul 2025-05-22 06:51:34 -07:00
parent 916e5f8610
commit 634cc45f3a

10
llm.go
View File

@ -106,6 +106,16 @@ func summarizeArticles(ollamaURL, ollamaModel string) {
for id, result := range summaries {
for _, article := range batch {
if article.ID == id {
// Log the summary details for each article
logInfo("summary_result", "LLM generated summary", map[string]interface{}{
"id": article.ID,
"title": article.Title,
"summary": result.Summary,
"importance": result.Importance,
"source": article.Source,
"length": len(result.Summary),
})
article.Summary = result.Summary
article.Importance = result.Importance
if err := updateArticle(article); err != nil {