pub struct InMemoryConversationMemory { /* private fields */ }Expand description
Simple in-memory implementation of ConversationMemory.
Implementations§
Trait Implementations§
Source§impl ConversationMemory for InMemoryConversationMemory
impl ConversationMemory for InMemoryConversationMemory
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>, String>> + 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>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads all messages for a session.
Source§fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
messages: Vec<Message>,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
messages: Vec<Message>,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Appends messages to a session.
Auto Trait Implementations§
impl !Freeze for InMemoryConversationMemory
impl RefUnwindSafe for InMemoryConversationMemory
impl Send for InMemoryConversationMemory
impl Sync for InMemoryConversationMemory
impl Unpin for InMemoryConversationMemory
impl UnsafeUnpin for InMemoryConversationMemory
impl UnwindSafe for InMemoryConversationMemory
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