pub trait VectorStore<E, M = EmptyMetadata>where
    E: Embeddings,
    M: Serialize + DeserializeOwned,{
    type Error: Debug + Error + VectorStoreError;

    // Required methods
    fn add_texts<'life0, 'async_trait>(
        &'life0 self,
        texts: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_documents<'life0, 'async_trait>(
        &'life0 self,
        documents: Vec<Document<M>>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn similarity_search<'life0, 'async_trait>(
        &'life0 self,
        query: String,
        limit: u32
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Document<M>>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

source

fn add_texts<'life0, 'async_trait>( &'life0 self, texts: Vec<String> ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn add_documents<'life0, 'async_trait>( &'life0 self, documents: Vec<Document<M>> ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§