Package com.openai.models.responses
Class ResponseUsage
-
- All Implemented Interfaces:
public final class ResponseUsageRepresents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResponseUsage.BuilderA builder for ResponseUsage.
public final classResponseUsage.OutputTokensDetailsA detailed breakdown of the output tokens.
-
Method Summary
Modifier and Type Method Description final LonginputTokens()The number of input tokens. final LongoutputTokens()The number of output tokens. final ResponseUsage.OutputTokensDetailsoutputTokensDetails()A detailed breakdown of the output tokens. final LongtotalTokens()The total number of tokens used. final JsonField<Long>_inputTokens()The number of input tokens. final JsonField<Long>_outputTokens()The number of output tokens. final JsonField<ResponseUsage.OutputTokensDetails>_outputTokensDetails()A detailed breakdown of the output tokens. final JsonField<Long>_totalTokens()The total number of tokens used. final Map<String, JsonValue>_additionalProperties()final ResponseUsagevalidate()final ResponseUsage.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseUsage.Builderbuilder()Returns a mutable builder for constructing an instance of ResponseUsage. -
-
Method Detail
-
inputTokens
final Long inputTokens()
The number of input tokens.
-
outputTokens
final Long outputTokens()
The number of output tokens.
-
outputTokensDetails
final ResponseUsage.OutputTokensDetails outputTokensDetails()
A detailed breakdown of the output tokens.
-
totalTokens
final Long totalTokens()
The total number of tokens used.
-
_inputTokens
final JsonField<Long> _inputTokens()
The number of input tokens.
-
_outputTokens
final JsonField<Long> _outputTokens()
The number of output tokens.
-
_outputTokensDetails
final JsonField<ResponseUsage.OutputTokensDetails> _outputTokensDetails()
A detailed breakdown of the output tokens.
-
_totalTokens
final JsonField<Long> _totalTokens()
The total number of tokens used.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final ResponseUsage validate()
-
toBuilder
final ResponseUsage.Builder toBuilder()
-
builder
final static ResponseUsage.Builder builder()
Returns a mutable builder for constructing an instance of ResponseUsage.
The following fields are required:
.inputTokens() .outputTokens() .outputTokensDetails() .totalTokens()
-
-
-
-