pub trait MemoryStore: Send + Sync {
// Required methods
fn index<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
metadata: MemoryMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryResult>, MemoryStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Semantic memory store for indexing and searching conversation history.
Required Methods§
Sourcefn index<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
metadata: MemoryMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn index<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
metadata: MemoryMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Index text content with associated metadata.
Sourcefn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryResult>, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryResult>, MemoryStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search for memories matching the query.