pub enum ContextStrategy {
FullHistory,
SlidingWindow {
window_size: usize,
},
Summarized {
summary_threshold: usize,
keep_recent: usize,
},
Smart {
max_tokens: usize,
relevance_threshold: f64,
},
}
Expand description
Strategies for managing conversation context
Variants§
FullHistory
Keep full conversation history
SlidingWindow
Keep a sliding window of recent messages
Summarized
Summarize old messages and keep recent ones
Smart
Smart context management based on relevance
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 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