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