openai_struct/models/completion_usage_completion_tokens_details.rs
1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11/// pub CompletionUsageCompletionTokensDetails : Breakdown of tokens used in a completion.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct CompletionUsageCompletionTokensDetails {
18 /// When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
19 #[serde(rename = "accepted_prediction_tokens")]
20 pub accepted_prediction_tokens: Option<i32>,
21 /// Audio input tokens generated by the model.
22 #[serde(rename = "audio_tokens")]
23 pub audio_tokens: Option<i32>,
24 /// Tokens generated by the model for reasoning.
25 #[serde(rename = "reasoning_tokens")]
26 pub reasoning_tokens: Option<i32>,
27 /// 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.
28 #[serde(rename = "rejected_prediction_tokens")]
29 pub rejected_prediction_tokens: Option<i32>,
30}