Skip to main content

CompactionSampler

Trait CompactionSampler 

Source
pub trait CompactionSampler: Send + Sync {
    // Required methods
    fn sample<'a>(
        &'a self,
        prompt: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<String, CompactionSampleError>> + Send + 'a>>;
    fn name(&self) -> &str;
}
Expand description

Interface for the LLM call that produces compaction summaries.

Required Methods§

Source

fn sample<'a>( &'a self, prompt: &'a str, ) -> Pin<Box<dyn Future<Output = Result<String, CompactionSampleError>> + Send + 'a>>

Produce a summary for prompt.

Source

fn name(&self) -> &str

Human-readable backend name for diagnostics.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§