llm_chain::traits

Trait VectorStore

Source
pub trait VectorStore<E, M = EmptyMetadata>{
    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§