Class ChatCreateCompletionResponse.Usage
-
- All Implemented Interfaces:
public final class ChatCreateCompletionResponse.Usage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCreateCompletionResponse.Usage.BuilderA builder for Usage.
-
Method Summary
Modifier and Type Method Description final Optional<Long>completionTokens()final Optional<Double>cost()Cost in USD final Optional<Long>promptTokens()final Optional<Long>totalTokens()final JsonField<Long>_completionTokens()Returns the raw JSON value of completionTokens. final JsonField<Double>_cost()Returns the raw JSON value of cost. final JsonField<Long>_promptTokens()Returns the raw JSON value of promptTokens. final JsonField<Long>_totalTokens()Returns the raw JSON value of totalTokens. final Map<String, JsonValue>_additionalProperties()final ChatCreateCompletionResponse.Usage.BuildertoBuilder()final ChatCreateCompletionResponse.Usagevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatCreateCompletionResponse.Usage.Builderbuilder()Returns a mutable builder for constructing an instance of Usage. -
-
Method Detail
-
completionTokens
final Optional<Long> completionTokens()
-
promptTokens
final Optional<Long> promptTokens()
-
totalTokens
final Optional<Long> totalTokens()
-
_completionTokens
final JsonField<Long> _completionTokens()
Returns the raw JSON value of completionTokens.
Unlike completionTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_cost
final JsonField<Double> _cost()
Returns the raw JSON value of cost.
Unlike cost, this method doesn't throw if the JSON field has an unexpected type.
-
_promptTokens
final JsonField<Long> _promptTokens()
Returns the raw JSON value of promptTokens.
Unlike promptTokens, 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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ChatCreateCompletionResponse.Usage.Builder toBuilder()
-
validate
final ChatCreateCompletionResponse.Usage 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 ChatCreateCompletionResponse.Usage.Builder builder()
Returns a mutable builder for constructing an instance of Usage.
-
-
-
-