pub struct AssistantUsage {
pub input_tokens: u32,
pub output_tokens: u32,
pub cache_creation_input_tokens: u32,
pub cache_read_input_tokens: u32,
pub service_tier: Option<String>,
pub cache_creation: Option<CacheCreationDetails>,
}Expand description
Usage information for assistant messages
Fields§
§input_tokens: u32Number of input tokens
output_tokens: u32Number of output tokens
cache_creation_input_tokens: u32Tokens used to create cache
cache_read_input_tokens: u32Tokens read from cache
service_tier: Option<String>Service tier used (e.g., “standard”)
cache_creation: Option<CacheCreationDetails>Detailed cache creation breakdown
Trait Implementations§
Source§impl Clone for AssistantUsage
impl Clone for AssistantUsage
Source§fn clone(&self) -> AssistantUsage
fn clone(&self) -> AssistantUsage
Returns a duplicate of the value. Read more
1.0.0 · 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 AssistantUsage
impl Debug for AssistantUsage
Source§impl<'de> Deserialize<'de> for AssistantUsage
impl<'de> Deserialize<'de> for AssistantUsage
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 AssistantUsage
impl RefUnwindSafe for AssistantUsage
impl Send for AssistantUsage
impl Sync for AssistantUsage
impl Unpin for AssistantUsage
impl UnsafeUnpin for AssistantUsage
impl UnwindSafe for AssistantUsage
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