pub struct MetadataContextAttributionResultContextAttribution {
pub compactions: MetadataContextAttributionResultContextAttributionCompactions,
pub entries: Vec<MetadataContextAttributionResultContextAttributionEntriesItem>,
pub total_tokens: i64,
}Expand description
Per-source token attribution snapshot for the current context window. The heaviest individual messages are available separately via metadata.getContextHeaviestMessages.
Fields§
§compactions: MetadataContextAttributionResultContextAttributionCompactionsSuccessful compaction history for the session.
entries: Vec<MetadataContextAttributionResultContextAttributionEntriesItem>Flat list of per-source attribution entries. Group by kind and render unrecognized kinds generically. Nesting and rollups are expressed via parentId.
total_tokens: i64Total token count of the current context window the entries are measured against (system message + conversation messages + tool definitions — the same total reported by /context). Divide an entry’s tokens by this to derive its share.
Trait Implementations§
Source§impl Clone for MetadataContextAttributionResultContextAttribution
impl Clone for MetadataContextAttributionResultContextAttribution
Source§fn clone(&self) -> MetadataContextAttributionResultContextAttribution
fn clone(&self) -> MetadataContextAttributionResultContextAttribution
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 Default for MetadataContextAttributionResultContextAttribution
impl Default for MetadataContextAttributionResultContextAttribution
Source§fn default() -> MetadataContextAttributionResultContextAttribution
fn default() -> MetadataContextAttributionResultContextAttribution
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetadataContextAttributionResultContextAttribution
impl<'de> Deserialize<'de> for MetadataContextAttributionResultContextAttribution
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
Auto Trait Implementations§
impl Freeze for MetadataContextAttributionResultContextAttribution
impl RefUnwindSafe for MetadataContextAttributionResultContextAttribution
impl Send for MetadataContextAttributionResultContextAttribution
impl Sync for MetadataContextAttributionResultContextAttribution
impl Unpin for MetadataContextAttributionResultContextAttribution
impl UnsafeUnpin for MetadataContextAttributionResultContextAttribution
impl UnwindSafe for MetadataContextAttributionResultContextAttribution
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