pub struct CompletionTokensDetails {
pub accepted_prediction_tokens: Option<usize>,
pub audio_tokens: Option<usize>,
pub reasoning_tokens: Option<usize>,
pub rejected_prediction_tokens: Option<usize>,
}
Fields§
§accepted_prediction_tokens: Option<usize>
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
audio_tokens: Option<usize>
Audio input tokens generated by the model.
reasoning_tokens: Option<usize>
Tokens generated by the model for reasoning.
rejected_prediction_tokens: Option<usize>
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 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
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