VectorStore

Trait VectorStore 

Source
pub trait VectorStore: Send + Sync {
    // Required methods
    fn add<'life0, 'async_trait>(
        &'life0 self,
        document: Document,
        embedding: Vec<f32>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn search<'life0, 'async_trait>(
        &'life0 self,
        embedding: Vec<f32>,
        params: SearchParams,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ScoredDocument>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

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

Source

fn search<'life0, 'async_trait>( &'life0 self, embedding: Vec<f32>, params: SearchParams, ) -> Pin<Box<dyn Future<Output = Result<Vec<ScoredDocument>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§