pub struct LocalVectorStore { /* private fields */ }Expand description
Simple in-memory vector store using cosine similarity.
Implementations§
Trait Implementations§
Source§impl Default for LocalVectorStore
impl Default for LocalVectorStore
Source§impl VectorStoreClient for LocalVectorStore
impl VectorStoreClient for LocalVectorStore
Source§fn upsert<'life0, 'async_trait>(
&'life0 self,
point: VectorPoint,
) -> Pin<Box<dyn Future<Output = MemoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert<'life0, 'async_trait>(
&'life0 self,
point: VectorPoint,
) -> Pin<Box<dyn Future<Output = MemoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inserts or updates a vector point.
Source§fn remove<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = MemoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = MemoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes a vector point if present.
Source§fn query<'life0, 'async_trait>(
&'life0 self,
query: VectorQuery,
) -> Pin<Box<dyn Future<Output = MemoryResult<Vec<VectorMatch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
query: VectorQuery,
) -> Pin<Box<dyn Future<Output = MemoryResult<Vec<VectorMatch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes a similarity query and returns matches ordered by descending score.
Auto Trait Implementations§
impl !Freeze for LocalVectorStore
impl !RefUnwindSafe for LocalVectorStore
impl Send for LocalVectorStore
impl Sync for LocalVectorStore
impl Unpin for LocalVectorStore
impl UnwindSafe for LocalVectorStore
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