pub struct ResponseUsage {
pub input_tokens: u32,
pub input_tokens_details: InputTokenDetails,
pub output_tokens: u32,
pub output_tokens_details: OutputTokenDetails,
pub total_tokens: u32,
}Available on crate feature
batch-types only.Expand description
Usage statistics for a response.
Fields§
§input_tokens: u32The number of input tokens.
input_tokens_details: InputTokenDetailsA detailed breakdown of the input tokens.
output_tokens: u32The number of output tokens.
output_tokens_details: OutputTokenDetailsA detailed breakdown of the output tokens.
total_tokens: u32The total number of tokens used.
Trait Implementations§
Source§impl Clone for ResponseUsage
Available on (crate features response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Clone for ResponseUsage
Available on (crate features
response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§fn clone(&self) -> ResponseUsage
fn clone(&self) -> ResponseUsage
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 ResponseUsage
Available on (crate features response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Debug for ResponseUsage
Available on (crate features
response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§impl<'de> Deserialize<'de> for ResponseUsage
Available on (crate features response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl<'de> Deserialize<'de> for ResponseUsage
Available on (crate features
response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.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
Source§impl PartialEq for ResponseUsage
Available on (crate features response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl PartialEq for ResponseUsage
Available on (crate features
response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§impl Serialize for ResponseUsage
Available on (crate features response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Serialize for ResponseUsage
Available on (crate features
response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.impl StructuralPartialEq for ResponseUsage
Available on (crate features
response-types or batch-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Auto Trait Implementations§
impl Freeze for ResponseUsage
impl RefUnwindSafe for ResponseUsage
impl Send for ResponseUsage
impl Sync for ResponseUsage
impl Unpin for ResponseUsage
impl UnwindSafe for ResponseUsage
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