pub struct PromptTokensDetails {
pub audio_tokens: Option<u32>,
pub cached_tokens: Option<u32>,
pub text_tokens: Option<i64>,
pub image_tokens: Option<i64>,
pub cache_write_tokens: Option<i64>,
}Available on crate feature
chat-completion-types and (crate features chat-completion-types or response-types) only.Expand description
Breakdown of tokens used in a completion.
Fields§
§audio_tokens: Option<u32>Audio input tokens present in the prompt.
cached_tokens: Option<u32>Cached tokens present in the prompt.
text_tokens: Option<i64>Text input tokens present in the prompt.
image_tokens: Option<i64>Image input tokens present in the prompt.
cache_write_tokens: Option<i64>The unadjusted number of prompt tokens written to cache.
Trait Implementations§
Source§impl Clone for PromptTokensDetails
impl Clone for PromptTokensDetails
Source§fn clone(&self) -> PromptTokensDetails
fn clone(&self) -> PromptTokensDetails
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PromptTokensDetails
impl Debug for PromptTokensDetails
Source§impl Default for PromptTokensDetails
impl Default for PromptTokensDetails
Source§fn default() -> PromptTokensDetails
fn default() -> PromptTokensDetails
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PromptTokensDetails
impl<'de> Deserialize<'de> for PromptTokensDetails
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 PromptTokensDetails
impl PartialEq for PromptTokensDetails
Source§impl Serialize for PromptTokensDetails
impl Serialize for PromptTokensDetails
impl StructuralPartialEq for PromptTokensDetails
Auto Trait Implementations§
impl Freeze for PromptTokensDetails
impl RefUnwindSafe for PromptTokensDetails
impl Send for PromptTokensDetails
impl Sync for PromptTokensDetails
impl Unpin for PromptTokensDetails
impl UnsafeUnpin for PromptTokensDetails
impl UnwindSafe for PromptTokensDetails
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