pub trait Summarizer: Send + Sync {
// Required methods
fn should_summarize(&self, history: &[Message]) -> bool;
fn summarize(&self, history: &mut Vec<Message>) -> Option<Message>;
}Expand description
Summarizer trait:
should_summarizechecks whether current history should be summarizedsummarizemutates the history to replace older messages with a single shortsystemsummary message
Required Methods§
Sourcefn should_summarize(&self, history: &[Message]) -> bool
fn should_summarize(&self, history: &[Message]) -> bool
Return true if history should be summarized now.