pub struct CompletionTokensDetails {
pub accepted_prediction_tokens: Option<i64>,
pub audio_tokens: Option<i64>,
pub reasoning_tokens: Option<i64>,
pub rejected_prediction_tokens: Option<i64>,
}
Expand description
Breakdown of tokens used in a completion.
Fields§
§accepted_prediction_tokens: Option<i64>
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
audio_tokens: Option<i64>
Audio input tokens generated by the model.
reasoning_tokens: Option<i64>
Tokens generated by the model for reasoning.
rejected_prediction_tokens: Option<i64>
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.
Implementations§
Source§impl CompletionTokensDetails
impl CompletionTokensDetails
Sourcepub fn builder() -> CompletionTokensDetailsBuilder<((), (), (), ())>
pub fn builder() -> CompletionTokensDetailsBuilder<((), (), (), ())>
Create a builder for building CompletionTokensDetails
.
On the builder, call .accepted_prediction_tokens(...)
(optional), .audio_tokens(...)
(optional), .reasoning_tokens(...)
(optional), .rejected_prediction_tokens(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of CompletionTokensDetails
.
Trait Implementations§
Source§impl Clone for CompletionTokensDetails
impl Clone for CompletionTokensDetails
Source§fn clone(&self) -> CompletionTokensDetails
fn clone(&self) -> CompletionTokensDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more