pub struct AgentTokenUsage {
pub input_tokens: u64,
pub output_tokens: u64,
pub cached_input_tokens: u64,
pub reasoning_output_tokens: u64,
}Expand description
Token usage for one OpenAI text/tool turn.
Fields§
§input_tokens: u64Total input tokens.
output_tokens: u64Total output tokens.
cached_input_tokens: u64Cached input tokens included in input_tokens.
reasoning_output_tokens: u64Reasoning tokens included in output_tokens.
Trait Implementations§
Source§impl Clone for AgentTokenUsage
impl Clone for AgentTokenUsage
Source§fn clone(&self) -> AgentTokenUsage
fn clone(&self) -> AgentTokenUsage
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 AgentTokenUsage
impl Debug for AgentTokenUsage
Source§impl Default for AgentTokenUsage
impl Default for AgentTokenUsage
Source§fn default() -> AgentTokenUsage
fn default() -> AgentTokenUsage
Returns the “default value” for a type. Read more
impl Eq for AgentTokenUsage
Source§impl PartialEq for AgentTokenUsage
impl PartialEq for AgentTokenUsage
impl StructuralPartialEq for AgentTokenUsage
Auto Trait Implementations§
impl Freeze for AgentTokenUsage
impl RefUnwindSafe for AgentTokenUsage
impl Send for AgentTokenUsage
impl Sync for AgentTokenUsage
impl Unpin for AgentTokenUsage
impl UnsafeUnpin for AgentTokenUsage
impl UnwindSafe for AgentTokenUsage
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