pub struct ConversationBufferMemory { /* private fields */ }Expand description
A memory strategy that stores the full conversation buffer.
This is a passthrough wrapper around any MemoryStore that makes
the “keep everything” strategy explicit and composable.
Implementations§
Source§impl ConversationBufferMemory
impl ConversationBufferMemory
Sourcepub fn new(store: Arc<dyn MemoryStore>) -> Self
pub fn new(store: Arc<dyn MemoryStore>) -> Self
Create a new buffer memory wrapping the given store.
Trait Implementations§
Source§impl MemoryStore for ConversationBufferMemory
impl MemoryStore for ConversationBufferMemory
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
message: Message,
) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + 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>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for ConversationBufferMemory
impl !RefUnwindSafe for ConversationBufferMemory
impl Send for ConversationBufferMemory
impl Sync for ConversationBufferMemory
impl Unpin for ConversationBufferMemory
impl UnsafeUnpin for ConversationBufferMemory
impl !UnwindSafe for ConversationBufferMemory
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