pub enum ContextStrategy {
Unlimited,
SlidingWindow {
max_tokens: u32,
},
}Expand description
Strategy for managing the context window.
Variants§
Unlimited
No trimming — all messages are sent (current default behavior).
SlidingWindow
Keep first message + as many recent messages as fit in max_tokens.
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 (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 ContextStrategy
impl Debug for ContextStrategy
Source§impl PartialEq for ContextStrategy
impl PartialEq for ContextStrategy
Source§fn eq(&self, other: &ContextStrategy) -> bool
fn eq(&self, other: &ContextStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContextStrategy
Auto 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