Skip to content

feat: Add AI Summarizer extension#471

Open
rancur wants to merge 1 commit into
FreshRSS:mainfrom
rancur:feature/ai-summarization
Open

feat: Add AI Summarizer extension#471
rancur wants to merge 1 commit into
FreshRSS:mainfrom
rancur:feature/ai-summarization

Conversation

@rancur
Copy link
Copy Markdown

@rancur rancur commented Jun 2, 2026

Summary

This PR implements Feature Request #240 by adding an AI Summarizer extension that automatically generates AI-powered summaries for RSS articles and displays them at the top of each article.

Motivation

Users requested native AI summary functionality to help them quickly decide if an article is worth reading. The current workarounds require external tools or complex setups. This extension provides a clean, integrated solution.

Features

  • OpenAI-compatible API support - Works with OpenAI, Ollama, LocalAI, LiteLLM, and any OpenAI-compatible endpoint
  • Customizable prompts - Full control over the summarization prompt with template placeholders ({title}, {content}, {author}, etc.)
  • Multiple display styles - Choose from blockquote, styled info box, or simple italic formatting
  • Smart caching - Summaries are cached per entry to avoid redundant API calls
  • Conditional processing - Filter which articles get summarized using FreshRSS Boolean search syntax
  • Unread-only mode - Optionally only summarize unread articles to save API costs
  • Retry logic - Automatic retry with exponential backoff for transient API failures
  • Content truncation - Control token usage by limiting content length sent to the API

Implementation

  • Uses the EntryBeforeDisplay hook to prepend summaries to article content
  • Built on the same architecture as xExtension-LlmClassification for consistency
  • Summaries are cached in user configuration to avoid redundant API calls
  • Supports both cloud APIs (OpenAI) and local LLMs (Ollama, LocalAI)

Example Output

Blockquote style (default)

┌──────────────────────────────────────────┐
│ 📝 AI Summary: This article discusses   │
│ the latest advances in AI technology...  │
└──────────────────────────────────────────┘
[Original article content...]

Testing

The extension has been:

  • Built following FreshRSS extension conventions
  • Modeled after the existing xExtension-LlmClassification architecture
  • Includes comprehensive documentation and configuration options

Usage Example

  1. Install the extension in FreshRSS
  2. Configure API endpoint (e.g., https://api.openai.com/v1 or http://localhost:11434/v1 for Ollama)
  3. Set API key (if using cloud API)
  4. Enable "Enable AI summarization"
  5. Customize prompt and display style as desired
  6. Articles now show AI summaries at the top!

Privacy Considerations

  • Article content is sent to the configured API endpoint
  • Users can run a local LLM (Ollama, LocalAI) to keep data private
  • Summaries are stored per-user (not shared between users)

Closes

Closes #240


🤖 Generated with Claude Code by Barry (Will Curran's AI assistant)

Implements feature request FreshRSS#240 - AI-powered article summarization

This extension automatically generates AI summaries for RSS articles and
displays them at the top of each article, helping readers quickly decide
if content is worth their time.

Features:
- OpenAI-compatible API support (OpenAI, Ollama, LocalAI, etc.)
- Customizable summarization prompts with template placeholders
- Multiple display styles (blockquote, info box, simple)
- Per-entry caching to avoid redundant API calls
- Unread-only mode to save API costs
- Search filters using FreshRSS Boolean search syntax
- Retry logic with exponential backoff for transient failures
- Content truncation for token usage control

Uses EntryBeforeDisplay hook to prepend summaries to article content.
Built on the same architecture as xExtension-LlmClassification.

Addresses: FreshRSS#240

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【New demand】Use AI to automatically summarize content to the front of the article

1 participant