Class Transcription.Usage.Tokens
-
- All Implemented Interfaces:
public final class Transcription.Usage.TokensUsage statistics for models billed by token usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTranscription.Usage.Tokens.BuilderA builder for Tokens.
public final classTranscription.Usage.Tokens.InputTokenDetailsDetails about the input tokens billed for this request.
-
Method Summary
Modifier and Type Method Description final LonginputTokens()Number of input tokens billed for this request. final LongoutputTokens()Number of output tokens generated. final LongtotalTokens()Total number of tokens used (input + output). final JsonValue_type()The type of the usage object. final Optional<Transcription.Usage.Tokens.InputTokenDetails>inputTokenDetails()Details about the input tokens billed for this request. final JsonField<Long>_inputTokens()Returns the raw JSON value of inputTokens. final JsonField<Long>_outputTokens()Returns the raw JSON value of outputTokens. final JsonField<Long>_totalTokens()Returns the raw JSON value of totalTokens. final JsonField<Transcription.Usage.Tokens.InputTokenDetails>_inputTokenDetails()Returns the raw JSON value of inputTokenDetails. final Map<String, JsonValue>_additionalProperties()final Transcription.Usage.Tokens.BuildertoBuilder()final Transcription.Usage.Tokensvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Transcription.Usage.Tokens.Builderbuilder()Returns a mutable builder for constructing an instance of Tokens. -
-
Method Detail
-
inputTokens
final Long inputTokens()
Number of input tokens billed for this request.
-
outputTokens
final Long outputTokens()
Number of output tokens generated.
-
totalTokens
final Long totalTokens()
Total number of tokens used (input + output).
-
_type
final JsonValue _type()
The type of the usage object. Always
tokensfor this variant.Expected to always return the following:
JsonValue.from("tokens")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
inputTokenDetails
final Optional<Transcription.Usage.Tokens.InputTokenDetails> inputTokenDetails()
Details about the input tokens billed for this request.
-
_inputTokens
final JsonField<Long> _inputTokens()
Returns the raw JSON value of inputTokens.
Unlike inputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_outputTokens
final JsonField<Long> _outputTokens()
Returns the raw JSON value of outputTokens.
Unlike outputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_totalTokens
final JsonField<Long> _totalTokens()
Returns the raw JSON value of totalTokens.
Unlike totalTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_inputTokenDetails
final JsonField<Transcription.Usage.Tokens.InputTokenDetails> _inputTokenDetails()
Returns the raw JSON value of inputTokenDetails.
Unlike inputTokenDetails, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final Transcription.Usage.Tokens.Builder toBuilder()
-
validate
final Transcription.Usage.Tokens validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static Transcription.Usage.Tokens.Builder builder()
Returns a mutable builder for constructing an instance of Tokens.
The following fields are required:
.inputTokens() .outputTokens() .totalTokens()
-
-
-
-