pub struct CompactionConfig { /* private fields */ }Expand description
Runtime-owned policy for checkpoint compaction.
enabled and policy drive automatic compaction before a provider request. Manual
crate::Runtime::compact_context_once calls still take an explicit
CitationCompactionPolicy so tests and callers can run one-off compaction
passes without mutating runtime construction policy.
reasoning_effort is not path-specific: it applies to every compaction
request, automatic or manual, which is why this type is named for compaction
rather than for one of its callers.
Compaction is a summarization turn over the whole covered window, so it never
inherits the primary model’s reasoning effort: a primary tuned for hard
coding turns can spend its entire output budget reasoning about history and
never write the checkpoint. None leaves the provider default in place.
Implementations§
Source§impl CompactionConfig
impl CompactionConfig
Sourcepub fn enabled(policy: CitationCompactionPolicy) -> Self
pub fn enabled(policy: CitationCompactionPolicy) -> Self
Enables automatic compaction with the provided policy.
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
Disables automatic compaction.
The policy remains populated with defaults so disabled configs can be inspected or re-enabled by callers without constructing a dummy policy.
pub const fn is_enabled(&self) -> bool
pub const fn policy(&self) -> CitationCompactionPolicy
Sourcepub fn with_reasoning_effort(
self,
reasoning_effort: Option<ReasoningEffort>,
) -> Self
pub fn with_reasoning_effort( self, reasoning_effort: Option<ReasoningEffort>, ) -> Self
Returns a copy configured with a reasoning-effort level for compaction.
Sourcepub fn reasoning_effort(&self) -> Option<&ReasoningEffort>
pub fn reasoning_effort(&self) -> Option<&ReasoningEffort>
Optional reasoning-effort level for compaction model requests.
Trait Implementations§
Source§impl Clone for CompactionConfig
impl Clone for CompactionConfig
Source§impl Debug for CompactionConfig
impl Debug for CompactionConfig
Source§impl Default for CompactionConfig
impl Default for CompactionConfig
impl Eq for CompactionConfig
Source§impl PartialEq for CompactionConfig
impl PartialEq for CompactionConfig
impl StructuralPartialEq for CompactionConfig
Auto Trait Implementations§
impl Forget for CompactionConfig
impl Freeze for CompactionConfig
impl Move 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.