pub struct ContextCompactingData {Show 13 fields
pub reason: CompactionReason,
pub strategy: String,
pub messages_before: usize,
pub tokens_before: Option<u64>,
pub bytes_before: Option<u64>,
pub trigger: CompactionTrigger,
pub model: String,
pub provider: Option<String>,
pub driver: Option<String>,
pub budget_remaining_tokens: Option<u64>,
pub source_sequence: Option<i64>,
pub cache_read_tokens: Option<u32>,
pub cache_creation_tokens: Option<u32>,
}Expand description
Data for context.compacting event (compaction starting).
Fields§
§reason: CompactionReasonWhy compaction was triggered.
strategy: StringStrategy requested (may differ from strategy_used in the completed event).
messages_before: usizeNumber of messages before compaction.
tokens_before: Option<u64>Estimated or provider-reported input tokens before compaction.
bytes_before: Option<u64>Serialized request-context bytes before compaction, when measurable.
trigger: CompactionTriggerWhat triggered this attempt: context-window budget or cost pressure.
model: StringModel performing the compaction.
provider: Option<String>Provider backend (e.g. “openai”), when known.
driver: Option<String>Local driver identifier, when known.
budget_remaining_tokens: Option<u64>Tokens of headroom remaining when the attempt started, when measurable.
source_sequence: Option<i64>Source message sequence the attempt ran at, when known.
cache_read_tokens: Option<u32>Cached input tokens read before compaction, when reported.
cache_creation_tokens: Option<u32>Cache-creation tokens written before compaction, when reported.
Trait Implementations§
Source§impl Clone for ContextCompactingData
impl Clone for ContextCompactingData
Source§fn clone(&self) -> ContextCompactingData
fn clone(&self) -> ContextCompactingData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more