Skip to main content

Summarizer

Trait Summarizer 

Source
pub trait Summarizer: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn summarize<'life0, 'life1, 'async_trait>(
        &'life0 self,
        entries: &'life1 [MemoryEntry],
        kind: SummaryKind,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Summarization backend for memory compaction.

Implementations call LLM APIs or use deterministic fallbacks.

Required Methods§

Source

fn name(&self) -> &str

Return the backend name (e.g., “openrouter”, “deterministic”).

Source

fn summarize<'life0, 'life1, 'async_trait>( &'life0 self, entries: &'life1 [MemoryEntry], kind: SummaryKind, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Summarize a batch of entries into a single summary string.

Implementors§