MemoryRetriever

Trait MemoryRetriever 

Source
pub trait MemoryRetriever: Send + Sync {
    // Required methods
    fn prepare<'life0, 'async_trait>(
        &'life0 self,
        request: RetrievalRequest,
    ) -> Pin<Box<dyn Future<Output = Result<PreparedMemorySnapshot, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn retrieve_immediate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        turn_id: TurnId,
        budget: RetrievalBudget,
    ) -> Pin<Box<dyn Future<Output = Result<PreparedMemorySnapshot, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Prepares and serves memory context.

Required Methods§

Source

fn prepare<'life0, 'async_trait>( &'life0 self, request: RetrievalRequest, ) -> Pin<Box<dyn Future<Output = Result<PreparedMemorySnapshot, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run a plan and produce a snapshot.

Source

fn retrieve_immediate<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, turn_id: TurnId, budget: RetrievalBudget, ) -> Pin<Box<dyn Future<Output = Result<PreparedMemorySnapshot, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Answer a query directly, for when speculation missed.

Implementors§