pub struct ContextSection {
pub compaction_threshold: f64,
pub keep_last_messages: usize,
pub enabled: bool,
}Expand description
Context management configuration.
Fields§
§compaction_threshold: f64Token ratio threshold (0.0–1.0) at which context compaction triggers. Default 0.8 = compact when messages exceed 80% of the model’s context window.
keep_last_messages: usizeNumber of most-recent messages to keep when truncating.
enabled: boolEnable context compaction. Defaults to true.
Trait Implementations§
Source§impl Debug for ContextSection
impl Debug for ContextSection
Source§impl Default for ContextSection
impl Default for ContextSection
Source§impl<'de> Deserialize<'de> for ContextSection
impl<'de> Deserialize<'de> for ContextSection
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 ContextSection
impl RefUnwindSafe for ContextSection
impl Send for ContextSection
impl Sync for ContextSection
impl Unpin for ContextSection
impl UnsafeUnpin for ContextSection
impl UnwindSafe for ContextSection
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