Class CompletionUsage.CompletionTokensDetails
-
- All Implemented Interfaces:
public final class CompletionUsage.CompletionTokensDetails
Breakdown of tokens used in a completion.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
CompletionUsage.CompletionTokensDetails.Builder
-
Method Summary
Modifier and Type Method Description final Optional<Long>
acceptedPredictionTokens()
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. final Optional<Long>
audioTokens()
Audio input tokens generated by the model. final Optional<Long>
reasoningTokens()
Tokens generated by the model for reasoning. final Optional<Long>
rejectedPredictionTokens()
When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. final JsonField<Long>
_acceptedPredictionTokens()
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. final JsonField<Long>
_audioTokens()
Audio input tokens generated by the model. final JsonField<Long>
_reasoningTokens()
Tokens generated by the model for reasoning. final JsonField<Long>
_rejectedPredictionTokens()
When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. final Map<String, JsonValue>
_additionalProperties()
final CompletionUsage.CompletionTokensDetails
validate()
final CompletionUsage.CompletionTokensDetails.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static CompletionUsage.CompletionTokensDetails.Builder
builder()
-
-
Method Detail
-
acceptedPredictionTokens
final Optional<Long> acceptedPredictionTokens()
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
-
audioTokens
final Optional<Long> audioTokens()
Audio input tokens generated by the model.
-
reasoningTokens
final Optional<Long> reasoningTokens()
Tokens generated by the model for reasoning.
-
rejectedPredictionTokens
final Optional<Long> rejectedPredictionTokens()
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.
-
_acceptedPredictionTokens
final JsonField<Long> _acceptedPredictionTokens()
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
-
_audioTokens
final JsonField<Long> _audioTokens()
Audio input tokens generated by the model.
-
_reasoningTokens
final JsonField<Long> _reasoningTokens()
Tokens generated by the model for reasoning.
-
_rejectedPredictionTokens
final JsonField<Long> _rejectedPredictionTokens()
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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final CompletionUsage.CompletionTokensDetails validate()
-
toBuilder
final CompletionUsage.CompletionTokensDetails.Builder toBuilder()
-
builder
final static CompletionUsage.CompletionTokensDetails.Builder builder()
-
-
-
-