pub struct CompactPolicy {
pub high_water: f32,
pub target: f32,
}Expand description
Governs when and how far the loop compacts context. Hysteresis: only
start compacting once usage crosses high_water, and stop as soon as it’s
back under target — instead of running every stage above a threshold on
every turn. This avoids over-compacting (needlessly reaching the lossy,
main-model AutoCompact stage) and, because compaction rewrites history and
invalidates the provider prefix cache, avoids nibbling the context every
single turn.
Fields§
§high_water: f32Start compacting when used/window exceeds this. Default 0.75.
target: f32Stop as soon as used/window is back at/under this. Default 0.55.
Trait Implementations§
Source§impl Clone for CompactPolicy
impl Clone for CompactPolicy
Source§fn clone(&self) -> CompactPolicy
fn clone(&self) -> CompactPolicy
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 CompactPolicy
impl Debug for CompactPolicy
Auto Trait Implementations§
impl Freeze for CompactPolicy
impl RefUnwindSafe for CompactPolicy
impl Send for CompactPolicy
impl Sync for CompactPolicy
impl Unpin for CompactPolicy
impl UnsafeUnpin for CompactPolicy
impl UnwindSafe for CompactPolicy
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