Class CompletionUsage.CompletionTokensDetails
-
- All Implemented Interfaces:
public final class CompletionUsage.CompletionTokensDetailsBreakdown of tokens used in a completion.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCompletionUsage.CompletionTokensDetails.BuilderA builder for CompletionTokensDetails.
-
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.CompletionTokensDetailsvalidate()final CompletionUsage.CompletionTokensDetails.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CompletionUsage.CompletionTokensDetails.Builderbuilder()-
-
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()
-
-
-
-