pub struct SqliteShortTerm { /* private fields */ }Expand description
SQLite-backed short-term conversation memory.
Trait Implementations§
Source§impl ShortTermMemory for SqliteShortTerm
impl ShortTermMemory for SqliteShortTerm
Source§fn append<'life0, 'async_trait>(
&'life0 self,
thread: ThreadId,
msg: Message,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append<'life0, 'async_trait>(
&'life0 self,
thread: ThreadId,
msg: Message,
) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append a message to the thread’s history.
Source§fn load<'life0, 'async_trait>(
&'life0 self,
thread: ThreadId,
max_tokens: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
thread: ThreadId,
max_tokens: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load up to
max_tokens of the most-recent messages, oldest first.
Implementations approximate token counts (provider-specific).Auto Trait Implementations§
impl Freeze for SqliteShortTerm
impl !RefUnwindSafe for SqliteShortTerm
impl Send for SqliteShortTerm
impl Sync for SqliteShortTerm
impl Unpin for SqliteShortTerm
impl UnsafeUnpin for SqliteShortTerm
impl !UnwindSafe for SqliteShortTerm
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