Class TranscriptionTextDoneEvent.Usage
-
- All Implemented Interfaces:
public final class TranscriptionTextDoneEvent.UsageUsage statistics for models billed by token usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTranscriptionTextDoneEvent.Usage.BuilderA builder for Usage.
public final classTranscriptionTextDoneEvent.Usage.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<TranscriptionTextDoneEvent.Usage.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<TranscriptionTextDoneEvent.Usage.InputTokenDetails>_inputTokenDetails()Returns the raw JSON value of inputTokenDetails. final Map<String, JsonValue>_additionalProperties()final TranscriptionTextDoneEvent.Usage.BuildertoBuilder()final TranscriptionTextDoneEvent.Usagevalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static TranscriptionTextDoneEvent.Usage.Builderbuilder()Returns a mutable builder for constructing an instance of Usage. -
-
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<TranscriptionTextDoneEvent.Usage.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<TranscriptionTextDoneEvent.Usage.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 TranscriptionTextDoneEvent.Usage.Builder toBuilder()
-
validate
final TranscriptionTextDoneEvent.Usage validate()
-
builder
final static TranscriptionTextDoneEvent.Usage.Builder builder()
Returns a mutable builder for constructing an instance of Usage.
The following fields are required:
.inputTokens() .outputTokens() .totalTokens()
-
-
-
-