Skip to main content

Extractor

Trait Extractor 

Source
pub trait Extractor:
    Send
    + Sync
    + 'static {
    // Required method
    fn extract<'life0, 'life1, 'async_trait>(
        &'life0 self,
        messages: &'life1 [Message],
        context: ExtractorContext,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ExtractionResult>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn name(&self) -> &str { ... }
}
Expand description

Turns conversation messages into discrete entries (Extractor).

Required Methods§

Source

fn extract<'life0, 'life1, 'async_trait>( &'life0 self, messages: &'life1 [Message], context: ExtractorContext, ) -> Pin<Box<dyn Future<Output = Result<Vec<ExtractionResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Extracts entries from the filtered messages.

Provided Methods§

Source

fn name(&self) -> &str

The name the extraction span records as memory.extractor.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§