Skip to main content

BaseEventsSummarizer

Trait BaseEventsSummarizer 

Source
pub trait BaseEventsSummarizer: Send + Sync {
    // Required method
    fn summarize_events<'life0, 'life1, 'async_trait>(
        &'life0 self,
        events: &'life1 [Event],
    ) -> Pin<Box<dyn Future<Output = Result<Option<Event>, AdkError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Trait for summarizing events during context compaction.

Implementations receive a window of events and produce a single compacted event containing a summary. The runner calls this when the compaction interval is reached.

Required Methods§

Source

fn summarize_events<'life0, 'life1, 'async_trait>( &'life0 self, events: &'life1 [Event], ) -> Pin<Box<dyn Future<Output = Result<Option<Event>, AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Summarize the given events into a single compacted event. Returns None if no compaction is needed (e.g., empty input).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§