pub trait VectorSearch: Send + Sync {
// Required methods
fn find_similar<'life0, 'life1, 'async_trait>(
&'life0 self,
embedding: &'life1 [f32],
namespace_id: i64,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<(i64, f32)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn store_vector<'life0, 'life1, 'async_trait>(
&'life0 self,
memory_id: i64,
embedding: &'life1 [f32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_vector<'life0, 'async_trait>(
&'life0 self,
memory_id: i64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for vector search operations
Required Methods§
Sourcefn find_similar<'life0, 'life1, 'async_trait>(
&'life0 self,
embedding: &'life1 [f32],
namespace_id: i64,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<(i64, f32)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_similar<'life0, 'life1, 'async_trait>(
&'life0 self,
embedding: &'life1 [f32],
namespace_id: i64,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<(i64, f32)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find similar vectors