pub enum ContextStrategy {
LastN(usize),
StripToolCalls,
StripAndTruncate(usize),
}Expand description
Strategy for editing context before model calls.
Variants§
LastN(usize)
Keep the last N messages (preserving system messages).
StripToolCalls
Remove tool call/result pairs from the history, keeping only human and AI content messages.
StripAndTruncate(usize)
Apply both: strip tool calls, then keep last N.
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 moreAuto Trait Implementations§
impl Freeze for ContextStrategy
impl RefUnwindSafe for ContextStrategy
impl Send for ContextStrategy
impl Sync for ContextStrategy
impl Unpin for ContextStrategy
impl UnsafeUnpin 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