pub struct ImagesUsage {
pub total_tokens: i64,
pub input_tokens: i64,
pub output_tokens: i64,
pub input_tokens_details: InputTokensDetails,
}
Expand description
For gpt-image-1
only, the token usage information for the image generation.
Fields§
§total_tokens: i64
The total number of tokens (images and text) used for the image generation.
input_tokens: i64
The number of tokens (images and text) in the input prompt.
output_tokens: i64
The number of image tokens in the output image.
input_tokens_details: InputTokensDetails
The input tokens detailed information for the image generation.
Implementations§
Source§impl ImagesUsage
impl ImagesUsage
Sourcepub fn builder() -> ImagesUsageBuilder<((), (), (), ())>
pub fn builder() -> ImagesUsageBuilder<((), (), (), ())>
Create a builder for building ImagesUsage
.
On the builder, call .total_tokens(...)
, .input_tokens(...)
, .output_tokens(...)
, .input_tokens_details(...)
to set the values of the fields.
Finally, call .build()
to create the instance of ImagesUsage
.
Trait Implementations§
Source§impl Clone for ImagesUsage
impl Clone for ImagesUsage
Source§fn clone(&self) -> ImagesUsage
fn clone(&self) -> ImagesUsage
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 ImagesUsage
impl Debug for ImagesUsage
Source§impl<'de> Deserialize<'de> for ImagesUsage
impl<'de> Deserialize<'de> for ImagesUsage
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 ImagesUsage
impl PartialEq for ImagesUsage
Source§impl Serialize for ImagesUsage
impl Serialize for ImagesUsage
impl Copy for ImagesUsage
impl StructuralPartialEq for ImagesUsage
Auto Trait Implementations§
impl Freeze for ImagesUsage
impl RefUnwindSafe for ImagesUsage
impl Send for ImagesUsage
impl Sync for ImagesUsage
impl Unpin for ImagesUsage
impl UnwindSafe for ImagesUsage
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