Trait mini_rag::VectorStore

source ·
pub trait VectorStore: Send {
    // Required methods
    fn new<'async_trait>(
        embedder: Box<dyn Embedder>,
        config: Configuration,
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait;
    fn add<'life0, 'async_trait>(
        &'life0 mut self,
        document: Document,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn retrieve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        top_k: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<(Document, f64)>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn new<'async_trait>( embedder: Box<dyn Embedder>, config: Configuration, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,

source

fn add<'life0, 'async_trait>( &'life0 mut self, document: Document, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

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

Implementors§