pub trait Compressor: Send + Sync {
// Required methods
fn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
config: &'life2 CompressionConfig,
) -> Pin<Box<dyn Future<Output = Result<SummarizedSegment>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn model_name(&self) -> &str;
}Expand description
Compressor trait for different implementations.
Required Methods§
Sourcefn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
config: &'life2 CompressionConfig,
) -> Pin<Box<dyn Future<Output = Result<SummarizedSegment>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
config: &'life2 CompressionConfig,
) -> Pin<Box<dyn Future<Output = Result<SummarizedSegment>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Compress messages using AI summarization.
Sourcefn model_name(&self) -> &str
fn model_name(&self) -> &str
Get the model name used.