Skip to main content

Retriever

Trait Retriever 

Source
pub trait Retriever: Send + Sync {
    // Required method
    fn retrieve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        top_k: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Document>, SynapseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for retrieving relevant documents given a query string.

Required Methods§

Source

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

Implementors§