pub struct CompactConfig {
pub trigger_turns: usize,
pub history_turns: usize,
pub grace_turns: usize,
pub memory_max_chars: usize,
pub critical_max_items: usize,
pub critical_reaudit: usize,
}Expand description
Tuning knobs for a Compactor.
Defaults suit interactive chat; tighten trigger_turns for bursty
workloads, widen grace_turns when the newest exchanges must never be
judged prematurely.
Fields§
§trigger_turns: usizeRun an audit once this many NEW turns arrived since the last audit.
history_turns: usizeTarget size of the live (in-context) history; an audit also fires when live turns exceed this capacity.
grace_turns: usizeThe newest this many turns are NEVER evicted, regardless of score.
memory_max_chars: usizeHard character ceiling for the rebuilt memory string.
critical_max_items: usizeMaximum number of verbatim critical facts kept; overflow drops the oldest admitted item (all admitted items scored 5, so age breaks ties).
critical_reaudit: usizeTurns scoring at or below this are re-scored during audits and count as eviction candidates when they land at or below 2.
Trait Implementations§
Source§impl Clone for CompactConfig
impl Clone for CompactConfig
Source§fn clone(&self) -> CompactConfig
fn clone(&self) -> CompactConfig
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 CompactConfig
impl Debug for CompactConfig
Auto Trait Implementations§
impl Freeze for CompactConfig
impl RefUnwindSafe for CompactConfig
impl Send for CompactConfig
impl Sync for CompactConfig
impl Unpin for CompactConfig
impl UnsafeUnpin for CompactConfig
impl UnwindSafe for CompactConfig
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