pub struct ContextPolicy {
pub pressure_thresholds_ppm: Option<PressureThresholds>,
pub target_after_compress_ppm: Option<Ppm>,
pub preserve_recent_turns: Option<u32>,
pub renewal_carryover_ppm: Option<Ppm>,
pub collapse_old_assistant_narration: Option<bool>,
pub idle_micro_compact_minutes: Option<u32>,
pub knowledge_budget_ppm: Option<Ppm>,
pub prompt_budget: Option<PromptBudget>,
}Expand description
Stable, replayable context behaviour. Every ratio is fixed-point ppm.
Two §13.3 rows land here: SetKnowledgeBudget (whose f64 ratio becomes
Self::knowledge_budget_ppm) and the retired split prompt-budget input (the U2 field that had no live
setter and no §7.3 home).
Fields§
§pressure_thresholds_ppm: Option<PressureThresholds>§target_after_compress_ppm: Option<Ppm>§preserve_recent_turns: Option<u32>§renewal_carryover_ppm: Option<Ppm>§collapse_old_assistant_narration: Option<bool>§idle_micro_compact_minutes: Option<u32>§knowledge_budget_ppm: Option<Ppm>Share of the context budget the knowledge partition may hold. 0 disables the partition’s
budget entirely.
prompt_budget: Option<PromptBudget>Trait Implementations§
Source§impl Clone for ContextPolicy
impl Clone for ContextPolicy
Source§fn clone(&self) -> ContextPolicy
fn clone(&self) -> ContextPolicy
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 ContextPolicy
impl Debug for ContextPolicy
Source§impl Default for ContextPolicy
impl Default for ContextPolicy
Source§fn default() -> ContextPolicy
fn default() -> ContextPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContextPolicy
impl<'de> Deserialize<'de> for ContextPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ContextPolicy
impl PartialEq for ContextPolicy
Source§impl Serialize for ContextPolicy
impl Serialize for ContextPolicy
impl StructuralPartialEq for ContextPolicy
Auto Trait Implementations§
impl Freeze for ContextPolicy
impl RefUnwindSafe for ContextPolicy
impl Send for ContextPolicy
impl Sync for ContextPolicy
impl Unpin for ContextPolicy
impl UnsafeUnpin for ContextPolicy
impl UnwindSafe for ContextPolicy
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