pub struct VectorStoreRetriever { /* private fields */ }Expand description
A retriever backed by a VectorStore and Embeddings model.
Wraps a vector store to provide the Retriever interface with
configurable search type and retrieval mode.
Implementations§
Source§impl VectorStoreRetriever
impl VectorStoreRetriever
Sourcepub fn new(
store: Box<dyn VectorStore>,
embeddings: Box<dyn Embeddings>,
k: usize,
search_type: SearchType,
retrieval_mode: RetrievalMode,
) -> Self
pub fn new( store: Box<dyn VectorStore>, embeddings: Box<dyn Embeddings>, k: usize, search_type: SearchType, retrieval_mode: RetrievalMode, ) -> Self
Creates a new VectorStoreRetriever.
Trait Implementations§
Source§impl Retriever for VectorStoreRetriever
impl Retriever for VectorStoreRetriever
Source§fn get_relevant_documents<'a>(
&'a self,
query: &'a str,
) -> BoxFuture<'a, Result<Vec<Document>, SynwireError>>
fn get_relevant_documents<'a>( &'a self, query: &'a str, ) -> BoxFuture<'a, Result<Vec<Document>, SynwireError>>
Retrieve documents relevant to the query.
Auto Trait Implementations§
impl Freeze for VectorStoreRetriever
impl !RefUnwindSafe for VectorStoreRetriever
impl Send for VectorStoreRetriever
impl Sync for VectorStoreRetriever
impl Unpin for VectorStoreRetriever
impl UnsafeUnpin for VectorStoreRetriever
impl !UnwindSafe for VectorStoreRetriever
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more