pub trait ContextStrategy: Send + Sync {
// Required method
fn compact(
&self,
messages: Vec<Message>,
max_tokens: usize,
) -> Result<Vec<Message>, AppError>;
}Expand description
Strategy for compacting the message history when context is too large.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".