Skip to main content

Crate cel_summarizer

Crate cel_summarizer 

Source
Expand description

LLM-backed Summarizer implementations for cel-memory.

Provides AnthropicSummarizer, OllamaSummarizer, and build_default. Wire either into [BasicMemoryProvider::with_summarizer] or [SqliteMemoryProvider::with_summarizer] to enable session summaries and rollups.

Structs§

AnthropicBackend
Anthropic Messages API backend.
AnthropicSummarizer
Anthropic-backed Summarizer.
MockBackend
Fixed-response backend for unit tests.
OllamaBackend
Ollama chat API backend.
OllamaSummarizer
Ollama-backed Summarizer. Local fallback path.

Constants§

ANTHROPIC_API_KEY_ENV
Env var holding the Anthropic API key for AnthropicSummarizer.
DEFAULT_ANTHROPIC_MODEL
Default Anthropic model for summarization.
DEFAULT_OLLAMA_MODEL
Default Ollama model for local summarization.
MODEL_ENV
Env var overriding the default model for either provider.
PROVIDER_ENV
Env var selecting the summarizer backend. Values: anthropic (default) or ollama.

Traits§

CompletionBackend
Abstraction over an LLM HTTP client — injectable for tests.

Functions§

build_default
Build the default summarizer from environment.