pub struct TrimConfig {
pub max_messages: usize,
pub target_tokens: usize,
pub preserve_first_user: bool,
pub summarization_threshold: f64,
}Expand description
Configuration for context trimming behavior.
Fields§
§max_messages: usizeMaximum number of non-system messages to retain.
target_tokens: usizeTarget token budget (approximate).
preserve_first_user: boolWhether to preserve the first user message (often contains the original task).
summarization_threshold: f64Ratio of context at which summarization triggers (0.0-1.0).
Trait Implementations§
Source§impl Clone for TrimConfig
impl Clone for TrimConfig
Source§fn clone(&self) -> TrimConfig
fn clone(&self) -> TrimConfig
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 TrimConfig
impl Debug for TrimConfig
Auto Trait Implementations§
impl Freeze for TrimConfig
impl RefUnwindSafe for TrimConfig
impl Send for TrimConfig
impl Sync for TrimConfig
impl Unpin for TrimConfig
impl UnsafeUnpin for TrimConfig
impl UnwindSafe for TrimConfig
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