pub trait Summarizer: Send + Sync {
// Required method
fn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn name(&self) -> &str { ... }
}Expand description
The model fill: writes one section’s dense text from its messages. Implementations must be callable from any task and must not retain the messages beyond the call.
Required Methods§
Sourcefn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + 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],
context: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
A dense markdown digest of messages — one range of the log,
in order. context is the digest of the immediately preceding
range, when there is one: it exists to resolve references
(“that file”, “run it again”) and is never part of the summary.
Err leaves the extractive stand-in in place.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".