pub struct SlidingWindowSummarizer { /* private fields */ }Expand description
Keeps only the most recent window messages and silently discards everything
older. No API call is made.
Use this when you want predictable, zero-cost context management and are comfortable with the model losing access to earlier turns.
Permanent Role::System messages are always preserved regardless of window.
§Example
use ds_api::{DeepseekAgent};
use ds_api::conversation::SlidingWindowSummarizer;
let agent = DeepseekAgent::new("sk-...")
.with_summarizer(SlidingWindowSummarizer::new(20));Implementations§
Trait Implementations§
Source§impl Clone for SlidingWindowSummarizer
impl Clone for SlidingWindowSummarizer
Source§fn clone(&self) -> SlidingWindowSummarizer
fn clone(&self) -> SlidingWindowSummarizer
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 SlidingWindowSummarizer
impl Debug for SlidingWindowSummarizer
Source§impl Summarizer for SlidingWindowSummarizer
impl Summarizer for SlidingWindowSummarizer
Auto Trait Implementations§
impl Freeze for SlidingWindowSummarizer
impl RefUnwindSafe for SlidingWindowSummarizer
impl Send for SlidingWindowSummarizer
impl Sync for SlidingWindowSummarizer
impl Unpin for SlidingWindowSummarizer
impl UnsafeUnpin for SlidingWindowSummarizer
impl UnwindSafe for SlidingWindowSummarizer
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