pub struct SessionUsageInfoData {
pub conversation_tokens: Option<f64>,
pub current_tokens: f64,
pub is_initial: Option<bool>,
pub messages_length: f64,
pub system_tokens: Option<f64>,
pub token_limit: f64,
pub tool_definitions_tokens: Option<f64>,
}Expand description
Current context window usage statistics including token and message counts
Fields§
§conversation_tokens: Option<f64>Token count from non-system messages (user, assistant, tool)
current_tokens: f64Current number of tokens in the context window
is_initial: Option<bool>Whether this is the first usage_info event emitted in this session
messages_length: f64Current number of messages in the conversation
system_tokens: Option<f64>Token count from system message(s)
token_limit: f64Maximum token count for the model’s context window
tool_definitions_tokens: Option<f64>Token count from tool definitions
Trait Implementations§
Source§impl Clone for SessionUsageInfoData
impl Clone for SessionUsageInfoData
Source§fn clone(&self) -> SessionUsageInfoData
fn clone(&self) -> SessionUsageInfoData
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 SessionUsageInfoData
impl Debug for SessionUsageInfoData
Source§impl<'de> Deserialize<'de> for SessionUsageInfoData
impl<'de> Deserialize<'de> for SessionUsageInfoData
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 SessionUsageInfoData
impl RefUnwindSafe for SessionUsageInfoData
impl Send for SessionUsageInfoData
impl Sync for SessionUsageInfoData
impl Unpin for SessionUsageInfoData
impl UnsafeUnpin for SessionUsageInfoData
impl UnwindSafe for SessionUsageInfoData
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