#[non_exhaustive]pub struct SummaryStats {
pub messages_summarized: usize,
pub usage: Usage,
pub cost_usd: Option<f64>,
}Expand description
What a summarization request produced, carried by
AgentEvent::ContextCompacted.
Weigh usage against the event’s tokens_before - tokens_after to decide whether an LLM compaction strategy earns its keep.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.messages_summarized: usizeMessages the briefing replaced.
Zero when a briefing was produced but could not be kept — the request
was still paid for, so the event still reports it, but method will be
CompactionMethod::Deterministic.
usage: UsageTokens the summarization request itself consumed.
cost_usd: Option<f64>Dollar cost of usage, when the summarization model’s rates are
configured (see CostConfig).
Implementations§
Trait Implementations§
Source§impl Clone for SummaryStats
impl Clone for SummaryStats
Source§impl Debug for SummaryStats
impl Debug for SummaryStats
Source§impl<'de> Deserialize<'de> for SummaryStats
impl<'de> Deserialize<'de> for SummaryStats
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 SummaryStats
impl PartialEq for SummaryStats
Source§impl Serialize for SummaryStats
impl Serialize for SummaryStats
impl StructuralPartialEq for SummaryStats
Auto Trait Implementations§
impl Freeze for SummaryStats
impl RefUnwindSafe for SummaryStats
impl Send for SummaryStats
impl Sync for SummaryStats
impl Unpin for SummaryStats
impl UnsafeUnpin for SummaryStats
impl UnwindSafe for SummaryStats
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