pub struct CompletionTokensDetails {
pub accepted_prediction_tokens: Option<u32>,
pub audio_tokens: Option<u32>,
pub reasoning_tokens: Option<u32>,
pub rejected_prediction_tokens: Option<u32>,
}
Expand description
Breakdown of tokens used in a completion.
Fields§
§accepted_prediction_tokens: Option<u32>
§audio_tokens: Option<u32>
Audio input tokens generated by the model.
reasoning_tokens: Option<u32>
Tokens generated by the model for reasoning.
rejected_prediction_tokens: Option<u32>
When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.
Trait Implementations§
Source§impl Clone for CompletionTokensDetails
impl Clone for CompletionTokensDetails
Source§fn clone(&self) -> CompletionTokensDetails
fn clone(&self) -> CompletionTokensDetails
Returns a copy 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 CompletionTokensDetails
impl Debug for CompletionTokensDetails
Source§impl<'de> Deserialize<'de> for CompletionTokensDetails
impl<'de> Deserialize<'de> for CompletionTokensDetails
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 CompletionTokensDetails
impl PartialEq for CompletionTokensDetails
Source§impl Serialize for CompletionTokensDetails
impl Serialize for CompletionTokensDetails
impl StructuralPartialEq for CompletionTokensDetails
Auto Trait Implementations§
impl Freeze for CompletionTokensDetails
impl RefUnwindSafe for CompletionTokensDetails
impl Send for CompletionTokensDetails
impl Sync for CompletionTokensDetails
impl Unpin for CompletionTokensDetails
impl UnwindSafe for CompletionTokensDetails
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