pub struct CompressionConfig {
pub enabled: bool,
pub trigger_tokens: usize,
pub keep_last_messages: usize,
pub max_transcript_chars: usize,
pub max_summary_chars: usize,
}Expand description
Tuning knobs for SummarizingMiddleware.
Fields§
§enabled: boolMaster switch. When false, on_pre_llm is a no-op.
trigger_tokens: usizeCompress when the estimated token count of the message list exceeds this.
keep_last_messages: usizeAlways keep the most recent N messages intact (the agent’s working context).
max_transcript_chars: usizeHard cap on the raw transcript we hand to the summarizer.
max_summary_chars: usizeTarget max length of the generated summary.
Trait Implementations§
Source§impl Clone for CompressionConfig
impl Clone for CompressionConfig
Source§fn clone(&self) -> CompressionConfig
fn clone(&self) -> CompressionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompressionConfig
impl Debug for CompressionConfig
Auto Trait Implementations§
impl Freeze for CompressionConfig
impl RefUnwindSafe for CompressionConfig
impl Send for CompressionConfig
impl Sync for CompressionConfig
impl Unpin for CompressionConfig
impl UnsafeUnpin for CompressionConfig
impl UnwindSafe for CompressionConfig
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