pub struct JsonlMemory { /* private fields */ }Expand description
File-based memory backend using JSONL format.
Each session is stored as a .jsonl file with one message per line.
Implementations§
Trait Implementations§
Source§impl Memory for JsonlMemory
impl Memory for JsonlMemory
Source§fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store conversation messages for a session.
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load conversation history for a session.
Source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
_query: &'life1 str,
_limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>>> + 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<MemoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search memories relevant to a query (for RAG-style retrieval).
Auto Trait Implementations§
impl Freeze for JsonlMemory
impl RefUnwindSafe for JsonlMemory
impl Send for JsonlMemory
impl Sync for JsonlMemory
impl Unpin for JsonlMemory
impl UnsafeUnpin for JsonlMemory
impl UnwindSafe for JsonlMemory
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