Struct inference_core::store::InMemoryEmbeddingStore
source · pub struct InMemoryEmbeddingStore { /* private fields */ }Implementations§
source§impl InMemoryEmbeddingStore
impl InMemoryEmbeddingStore
pub fn new() -> Self
pub fn add( &self, id: String, embedding: Embedding, document: Document ) -> String
pub fn add_all( &self, embeddings: Vec<Embedding>, embedded: Vec<Document> ) -> Vec<String>
pub fn find_relevant( &self, reference_embedding: Embedding, max_results: i8, min_score: f32 ) -> Vec<DocumentMatch>
Trait Implementations§
source§impl Clone for InMemoryEmbeddingStore
impl Clone for InMemoryEmbeddingStore
source§fn clone(&self) -> InMemoryEmbeddingStore
fn clone(&self) -> InMemoryEmbeddingStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for InMemoryEmbeddingStore
impl Send for InMemoryEmbeddingStore
impl Sync for InMemoryEmbeddingStore
impl Unpin for InMemoryEmbeddingStore
impl UnwindSafe for InMemoryEmbeddingStore
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