pub struct VecConversationState { /* private fields */ }Expand description
In-memory conversation state.
Implementations§
Source§impl VecConversationState
impl VecConversationState
Sourcepub fn from_messages(messages: Vec<Message>) -> Self
pub fn from_messages(messages: Vec<Message>) -> Self
Seed with messages.
Sourcepub fn compact_max_messages(&mut self, max_messages: usize)
pub fn compact_max_messages(&mut self, max_messages: usize)
Drop oldest non-system messages until max_messages remains.
Delegates to machi_compaction::max_messages::compact_max_messages.
Trait Implementations§
Source§impl Clone for VecConversationState
impl Clone for VecConversationState
Source§fn clone(&self) -> VecConversationState
fn clone(&self) -> VecConversationState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConversationState for VecConversationState
impl ConversationState for VecConversationState
Source§impl Debug for VecConversationState
impl Debug for VecConversationState
Source§impl Default for VecConversationState
impl Default for VecConversationState
Source§fn default() -> VecConversationState
fn default() -> VecConversationState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VecConversationState
impl RefUnwindSafe for VecConversationState
impl Send for VecConversationState
impl Sync for VecConversationState
impl Unpin for VecConversationState
impl UnsafeUnpin for VecConversationState
impl UnwindSafe for VecConversationState
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