pub struct TurnUsage {
pub prompt_tokens: u32,
pub completion_tokens: u32,
pub cache_read_tokens: u32,
pub cache_creation_tokens: u32,
}Expand description
Token usage reported at the end of an LLM call.
Fields§
§prompt_tokens: u32Number of tokens consumed by the prompt (input messages).
completion_tokens: u32Number of tokens generated by the model (output/response).
cache_read_tokens: u32Prompt tokens served from the provider’s cache.
cache_creation_tokens: u32Prompt tokens written to the provider’s cache.
Trait Implementations§
impl Copy for TurnUsage
Auto Trait Implementations§
impl Forget for TurnUsage
impl Freeze for TurnUsage
impl Move for TurnUsage
impl RefUnwindSafe for TurnUsage
impl Send for TurnUsage
impl Sync for TurnUsage
impl Unpin for TurnUsage
impl UnsafeUnpin for TurnUsage
impl UnwindSafe for TurnUsage
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