MemoryProvider

Trait MemoryProvider 

Source
pub trait MemoryProvider: Send + Sync {
    // Required methods
    fn query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        top_k: usize,
        min_score: f32,
    ) -> Pin<Box<dyn Future<Output = Result<MemoryContext>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn store_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session: &'life1 ReasoningSession,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for memory providers (enables mock testing and multiple backends)

Required Methods§

Source

fn query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, top_k: usize, min_score: f32, ) -> Pin<Box<dyn Future<Output = Result<MemoryContext>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query memory for relevant context

Source

fn store_session<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 ReasoningSession, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Store a reasoning session for future reference

Implementors§