VectorStoreClient

Trait VectorStoreClient 

Source
pub trait VectorStoreClient: Send + Sync {
    // Required methods
    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 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 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;
}
Expand description

Interface for vector store clients.

Required Methods§

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,

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,

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,

Executes a similarity query and returns matches ordered by descending score.

Implementors§