pub enum ContextStrategy {
KeepAll,
SlidingWindow {
size: u32,
},
Summarize {
summarize_after: u32,
keep_recent: u32,
},
Archive {
archive_after: u32,
keep_recent: u32,
},
}Expand description
Strategy for managing context window
Variants§
KeepAll
Keep all history (risk of overflow)
SlidingWindow
Keep only the last N messages
Summarize
Summarize older history, keep recent raw
Archive
Move older history to episodic memory
Trait Implementations§
Source§impl Clone for ContextStrategy
impl Clone for ContextStrategy
Source§fn clone(&self) -> ContextStrategy
fn clone(&self) -> ContextStrategy
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 ContextStrategy
impl Debug for ContextStrategy
Source§impl<'de> Deserialize<'de> for ContextStrategy
impl<'de> Deserialize<'de> for ContextStrategy
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
Auto Trait Implementations§
impl Freeze for ContextStrategy
impl RefUnwindSafe for ContextStrategy
impl Send for ContextStrategy
impl Sync for ContextStrategy
impl Unpin for ContextStrategy
impl UnsafeUnpin for ContextStrategy
impl UnwindSafe for ContextStrategy
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