pub struct MemoContextStore { /* private fields */ }Expand description
aria memo backed context store (SQLite, local / on-device).
Implementations§
Trait Implementations§
Source§impl ContextStore for MemoContextStore
impl ContextStore for MemoContextStore
Source§fn memorize<'life0, 'async_trait>(
&'life0 self,
frag: ContextFragment,
) -> Pin<Box<dyn Future<Output = Result<(), ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn memorize<'life0, 'async_trait>(
&'life0 self,
frag: ContextFragment,
) -> Pin<Box<dyn Future<Output = Result<(), ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Persist a fragment.
Source§fn recall<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 RecallQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<ContextFragment>, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recall<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 RecallQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<ContextFragment>, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve the most relevant fragments for a query.
Source§fn compact<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContextFragment, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn compact<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContextFragment, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Merge a session’s fragments into a single compact fragment.
Source§fn get_by_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ContextFragment>, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_by_key<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ContextFragment>, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lookup an explicit long-term memory by key (used by SDK
recall).Source§fn list_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ContextFragment>, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ContextFragment>, ContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Every fragment of a session, oldest first (used by
compact and by the
session memory listing).Auto Trait Implementations§
impl !Freeze for MemoContextStore
impl RefUnwindSafe for MemoContextStore
impl Send for MemoContextStore
impl Sync for MemoContextStore
impl Unpin for MemoContextStore
impl UnsafeUnpin for MemoContextStore
impl UnwindSafe for MemoContextStore
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