Skip to main content

MemoryExtractor

Trait MemoryExtractor 

Source
pub trait MemoryExtractor: Send + Sync {
    // Required methods
    fn extract<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        text: &'life1 str,
        session_id: Option<&'life2 str>,
        project_path: Option<&'life3 str>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn model_name(&self) -> &str;
}
Expand description

Trait for memory extraction implementations.

Required Methods§

Source

fn extract<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, text: &'life1 str, session_id: Option<&'life2 str>, project_path: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Extract memories from conversation text using AI.

Source

fn model_name(&self) -> &str

Get the model name used for extraction.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§