Class TranscriptionTextDoneEvent.Usage
-
- All Implemented Interfaces:
public final class TranscriptionTextDoneEvent.Usage
Usage statistics for models billed by token usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
TranscriptionTextDoneEvent.Usage.Builder
A builder for Usage.
public final class
TranscriptionTextDoneEvent.Usage.InputTokenDetails
Details about the input tokens billed for this request.
-
Method Summary
Modifier and Type Method Description final Long
inputTokens()
Number of input tokens billed for this request. final Long
outputTokens()
Number of output tokens generated. final Long
totalTokens()
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.Builder
toBuilder()
final TranscriptionTextDoneEvent.Usage
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static TranscriptionTextDoneEvent.Usage.Builder
builder()
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
tokens
for 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()
-
-
-
-