pub struct HistoryCompactContextWindow {
pub conversation_tokens: Option<i64>,
pub current_tokens: i64,
pub messages_length: i64,
pub system_tokens: Option<i64>,
pub token_limit: i64,
pub tool_definitions_tokens: Option<i64>,
}Expand description
Post-compaction context window usage breakdown
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§conversation_tokens: Option<i64>Token count from non-system messages (user, assistant, tool)
current_tokens: i64Current total tokens in the context window (system + conversation + tool definitions)
messages_length: i64Current number of messages in the conversation
system_tokens: Option<i64>Token count from system message(s)
token_limit: i64Maximum token count for the model’s context window
tool_definitions_tokens: Option<i64>Token count from tool definitions
Trait Implementations§
Source§impl Clone for HistoryCompactContextWindow
impl Clone for HistoryCompactContextWindow
Source§fn clone(&self) -> HistoryCompactContextWindow
fn clone(&self) -> HistoryCompactContextWindow
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 HistoryCompactContextWindow
impl Debug for HistoryCompactContextWindow
Source§impl Default for HistoryCompactContextWindow
impl Default for HistoryCompactContextWindow
Source§fn default() -> HistoryCompactContextWindow
fn default() -> HistoryCompactContextWindow
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HistoryCompactContextWindow
impl<'de> Deserialize<'de> for HistoryCompactContextWindow
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 HistoryCompactContextWindow
impl RefUnwindSafe for HistoryCompactContextWindow
impl Send for HistoryCompactContextWindow
impl Sync for HistoryCompactContextWindow
impl Unpin for HistoryCompactContextWindow
impl UnsafeUnpin for HistoryCompactContextWindow
impl UnwindSafe for HistoryCompactContextWindow
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