pub struct CompactionConfig { /* private fields */ }Expand description
Application-facing context-compaction policy.
The default proactively compacts at 85% of the model’s context budget and
lets the runtime select the best available strategy. Durable checkpoint
storage remains a host concern. This is the canonical CompactionConfig
exported from everruns-builtins and everruns; the expanded runtime
representation is named RuntimeCompactionConfig.
Implementations§
Source§impl CompactionConfig
impl CompactionConfig
Sourcepub fn strategy(self, strategy: CompactionStrategy) -> Self
pub fn strategy(self, strategy: CompactionStrategy) -> Self
Choose the compaction strategy.
Sourcepub fn proactive(self, enabled: bool) -> Self
pub fn proactive(self, enabled: bool) -> Self
Enable or disable compaction before a provider rejects an oversized request.
Sourcepub fn budget_percent(self, budget_percent: f32) -> Self
pub fn budget_percent(self, budget_percent: f32) -> Self
Set the proactive trigger as a fraction of the model context budget.
The capability validator accepts values from 0.1 through 1.0.
Trait Implementations§
Source§impl Clone for CompactionConfig
impl Clone for CompactionConfig
Source§fn clone(&self) -> CompactionConfig
fn clone(&self) -> CompactionConfig
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 moreimpl Copy for CompactionConfig
Source§impl Debug for CompactionConfig
impl Debug for CompactionConfig
Source§impl Default for CompactionConfig
impl Default for CompactionConfig
Source§impl IntoCapability for CompactionConfig
impl IntoCapability for CompactionConfig
Source§fn into_capability(self) -> CapabilitySpec
fn into_capability(self) -> CapabilitySpec
Consume the value and return its normalized specification.
Source§impl PartialEq for CompactionConfig
impl PartialEq for CompactionConfig
impl StructuralPartialEq for CompactionConfig
Auto Trait Implementations§
impl Freeze for CompactionConfig
impl RefUnwindSafe for CompactionConfig
impl Send for CompactionConfig
impl Sync for CompactionConfig
impl Unpin for CompactionConfig
impl UnsafeUnpin for CompactionConfig
impl UnwindSafe for CompactionConfig
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