pub trait CompactionSummarizer:
Debug
+ Send
+ Sync {
// Required method
fn summarize(
&self,
messages: Vec<CanonicalMessage>,
) -> CompactionSummaryFuture<'_>;
}Expand description
Product-supplied source of compaction summaries.
The kernel never owns a model for compaction. A product wires a summarizer that may call a model, retrieve a cached summary, or produce a deterministic truncation; the testkit provides a deterministic implementation.
Required Methods§
Sourcefn summarize(
&self,
messages: Vec<CanonicalMessage>,
) -> CompactionSummaryFuture<'_>
fn summarize( &self, messages: Vec<CanonicalMessage>, ) -> CompactionSummaryFuture<'_>
Produces one assistant summary message for the supplied transcript.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".