Skip to main content

CompactionHooks

Trait CompactionHooks 

Source
pub trait CompactionHooks: Send + Sync {
    // Required method
    fn generate_summary(&self, messages: &[AgentMessage]) -> Option<String>;
}
Expand description

Hook trait for customizing compaction summary generation.

Required Methods§

Source

fn generate_summary(&self, messages: &[AgentMessage]) -> Option<String>

Generate a summary for the messages being compacted. Return None to fall back to the core summary generator.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§