pub trait EmbeddingStorageBackend: Send + Sync {
// Required methods
fn store_episode_embedding<'life0, 'async_trait>(
&'life0 self,
episode_id: Uuid,
embedding: Vec<f32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn store_pattern_embedding<'life0, 'async_trait>(
&'life0 self,
pattern_id: PatternId,
embedding: Vec<f32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_episode_embedding<'life0, 'async_trait>(
&'life0 self,
episode_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<f32>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_pattern_embedding<'life0, 'async_trait>(
&'life0 self,
pattern_id: PatternId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<f32>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_similar_episodes<'life0, 'async_trait>(
&'life0 self,
query_embedding: Vec<f32>,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimilaritySearchResult<Episode>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_similar_patterns<'life0, 'async_trait>(
&'life0 self,
query_embedding: Vec<f32>,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimilaritySearchResult<Pattern>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for embedding storage backends
Required Methods§
Sourcefn store_episode_embedding<'life0, 'async_trait>(
&'life0 self,
episode_id: Uuid,
embedding: Vec<f32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_episode_embedding<'life0, 'async_trait>(
&'life0 self,
episode_id: Uuid,
embedding: Vec<f32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store an episode embedding
Sourcefn store_pattern_embedding<'life0, 'async_trait>(
&'life0 self,
pattern_id: PatternId,
embedding: Vec<f32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_pattern_embedding<'life0, 'async_trait>(
&'life0 self,
pattern_id: PatternId,
embedding: Vec<f32>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store a pattern embedding
Sourcefn get_episode_embedding<'life0, 'async_trait>(
&'life0 self,
episode_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_episode_embedding<'life0, 'async_trait>(
&'life0 self,
episode_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get an episode embedding
Sourcefn get_pattern_embedding<'life0, 'async_trait>(
&'life0 self,
pattern_id: PatternId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pattern_embedding<'life0, 'async_trait>(
&'life0 self,
pattern_id: PatternId,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a pattern embedding
Sourcefn find_similar_episodes<'life0, 'async_trait>(
&'life0 self,
query_embedding: Vec<f32>,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimilaritySearchResult<Episode>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_similar_episodes<'life0, 'async_trait>(
&'life0 self,
query_embedding: Vec<f32>,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimilaritySearchResult<Episode>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find similar episodes using vector similarity
Sourcefn find_similar_patterns<'life0, 'async_trait>(
&'life0 self,
query_embedding: Vec<f32>,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimilaritySearchResult<Pattern>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_similar_patterns<'life0, 'async_trait>(
&'life0 self,
query_embedding: Vec<f32>,
limit: usize,
threshold: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SimilaritySearchResult<Pattern>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find similar patterns using vector similarity