pub struct CompletionUsagePromptTokensDetails {
pub audio_tokens: Option<i64>,
pub cached_tokens: Option<i64>,
}
Expand description
Breakdown of tokens used in the prompt.
Fields§
§audio_tokens: Option<i64>
Audio input tokens present in the prompt.
cached_tokens: Option<i64>
Cached tokens present in the prompt.
Implementations§
Source§impl CompletionUsagePromptTokensDetails
impl CompletionUsagePromptTokensDetails
Sourcepub fn builder() -> CompletionUsagePromptTokensDetailsBuilder<((), ())>
pub fn builder() -> CompletionUsagePromptTokensDetailsBuilder<((), ())>
Create a builder for building CompletionUsagePromptTokensDetails
.
On the builder, call .audio_tokens(...)
(optional), .cached_tokens(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of CompletionUsagePromptTokensDetails
.
Trait Implementations§
Source§impl Clone for CompletionUsagePromptTokensDetails
impl Clone for CompletionUsagePromptTokensDetails
Source§fn clone(&self) -> CompletionUsagePromptTokensDetails
fn clone(&self) -> CompletionUsagePromptTokensDetails
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for CompletionUsagePromptTokensDetails
impl Default for CompletionUsagePromptTokensDetails
Source§fn default() -> CompletionUsagePromptTokensDetails
fn default() -> CompletionUsagePromptTokensDetails
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompletionUsagePromptTokensDetails
impl<'de> Deserialize<'de> for CompletionUsagePromptTokensDetails
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 CompletionUsagePromptTokensDetails
impl PartialEq for CompletionUsagePromptTokensDetails
Source§fn eq(&self, other: &CompletionUsagePromptTokensDetails) -> bool
fn eq(&self, other: &CompletionUsagePromptTokensDetails) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl Copy for CompletionUsagePromptTokensDetails
impl StructuralPartialEq for CompletionUsagePromptTokensDetails
Auto Trait Implementations§
impl Freeze for CompletionUsagePromptTokensDetails
impl RefUnwindSafe for CompletionUsagePromptTokensDetails
impl Send for CompletionUsagePromptTokensDetails
impl Sync for CompletionUsagePromptTokensDetails
impl Unpin for CompletionUsagePromptTokensDetails
impl UnwindSafe for CompletionUsagePromptTokensDetails
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