pub struct Usage {
pub input_tokens: i64,
pub input_tokens_details: UsageInputTokensDetails,
pub output_tokens: i64,
pub total_tokens: i64,
}Expand description
For the GPT image models only, the token usage information for the image generation.
Fields§
§input_tokens: i64The number of tokens (images and text) in the input prompt.
input_tokens_details: UsageInputTokensDetailsThe input tokens detailed information for the image generation.
output_tokens: i64The number of image tokens in the output image.
total_tokens: i64The total number of tokens (images and text) used for the image generation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Usage
impl<'de> Deserialize<'de> for Usage
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 Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnsafeUnpin for Usage
impl UnwindSafe for Usage
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