pub struct ContextManager {
pub recent_messages: Vec<Message>,
pub focus_topics: Vec<Cow<'static, str>>,
}Expand description
Tracks recent exchanges and focuses the agent on relevant topics.
§Examples
use lmm_agent::types::ContextManager;
let ctx = ContextManager::default();
assert!(ctx.recent_messages.is_empty());
assert!(ctx.focus_topics.is_empty());Fields§
§recent_messages: Vec<Message>The most recent messages in the conversation window.
focus_topics: Vec<Cow<'static, str>>Topics the agent is currently focused on.
Trait Implementations§
Source§impl Clone for ContextManager
impl Clone for ContextManager
Source§fn clone(&self) -> ContextManager
fn clone(&self) -> ContextManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextManager
impl Debug for ContextManager
Source§impl Default for ContextManager
impl Default for ContextManager
Source§fn default() -> ContextManager
fn default() -> ContextManager
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContextManager
impl<'de> Deserialize<'de> for ContextManager
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ContextManager
impl Hash for ContextManager
Source§impl PartialEq for ContextManager
impl PartialEq for ContextManager
Source§impl Serialize for ContextManager
impl Serialize for ContextManager
impl Eq for ContextManager
impl StructuralPartialEq for ContextManager
Auto Trait Implementations§
impl Freeze for ContextManager
impl RefUnwindSafe for ContextManager
impl Send for ContextManager
impl Sync for ContextManager
impl Unpin for ContextManager
impl UnsafeUnpin for ContextManager
impl UnwindSafe for ContextManager
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