Class Transcription.Usage.Tokens
-
- All Implemented Interfaces:
public final class Transcription.Usage.Tokens
Usage statistics for models billed by token usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
Transcription.Usage.Tokens.Builder
A builder for Tokens.
public final class
Transcription.Usage.Tokens.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<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.Builder
toBuilder()
final Transcription.Usage.Tokens
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static Transcription.Usage.Tokens.Builder
builder()
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
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<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()
-
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()
-
-
-
-