Class BetaFallbackMessageIterationUsage
-
- All Implemented Interfaces:
public final class BetaFallbackMessageIterationUsageToken usage for the fallback-model attempt of a server-side fallback request.
Produced in place of a
messageentry for whichever hop served the response. A declined hop produces the existingmessageentry. Whether a fallback model served the response is signalled by the presence of this entry inusage.iterations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaFallbackMessageIterationUsage.BuilderA builder for BetaFallbackMessageIterationUsage.
-
Method Summary
Modifier and Type Method Description final Optional<BetaCacheCreation>cacheCreation()Breakdown of cached tokens by TTL final LongcacheCreationInputTokens()The number of input tokens used to create the cache entry. final LongcacheReadInputTokens()The number of input tokens read from the cache. final LonginputTokens()The number of input tokens which were used. final Modelmodel()The model that will complete your prompt. final LongoutputTokens()The number of output tokens which were used. final JsonValue_type()Usage for the fallback-model attempt that served the responseExpected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("fallback_message")final JsonField<BetaCacheCreation>_cacheCreation()Returns the raw JSON value of cacheCreation. final JsonField<Long>_cacheCreationInputTokens()Returns the raw JSON value of cacheCreationInputTokens. final JsonField<Long>_cacheReadInputTokens()Returns the raw JSON value of cacheReadInputTokens. final JsonField<Long>_inputTokens()Returns the raw JSON value of inputTokens. final JsonField<Model>_model()Returns the raw JSON value of model. final JsonField<Long>_outputTokens()Returns the raw JSON value of outputTokens. final Map<String, JsonValue>_additionalProperties()final BetaFallbackMessageIterationUsage.BuildertoBuilder()final BetaFallbackMessageIterationUsagevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaFallbackMessageIterationUsage.Builderbuilder()Returns a mutable builder for constructing an instance of BetaFallbackMessageIterationUsage. -
-
Method Detail
-
cacheCreation
final Optional<BetaCacheCreation> cacheCreation()
Breakdown of cached tokens by TTL
-
cacheCreationInputTokens
final Long cacheCreationInputTokens()
The number of input tokens used to create the cache entry.
-
cacheReadInputTokens
final Long cacheReadInputTokens()
The number of input tokens read from the cache.
-
inputTokens
final Long inputTokens()
The number of input tokens which were used.
-
model
final Model model()
The model that will complete your prompt.
See models for additional details and options.
-
outputTokens
final Long outputTokens()
The number of output tokens which were used.
-
_type
final JsonValue _type()
Usage for the fallback-model attempt that served the response
Expected to always return the following:
JsonValue.from("fallback_message")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_cacheCreation
final JsonField<BetaCacheCreation> _cacheCreation()
Returns the raw JSON value of cacheCreation.
Unlike cacheCreation, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheCreationInputTokens
final JsonField<Long> _cacheCreationInputTokens()
Returns the raw JSON value of cacheCreationInputTokens.
Unlike cacheCreationInputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheReadInputTokens
final JsonField<Long> _cacheReadInputTokens()
Returns the raw JSON value of cacheReadInputTokens.
Unlike cacheReadInputTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_model
final JsonField<Model> _model()
Returns the raw JSON value of model.
Unlike model, 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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaFallbackMessageIterationUsage.Builder toBuilder()
-
validate
final BetaFallbackMessageIterationUsage 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 BetaFallbackMessageIterationUsage.Builder builder()
Returns a mutable builder for constructing an instance of BetaFallbackMessageIterationUsage.
The following fields are required:
.cacheCreation() .cacheCreationInputTokens() .cacheReadInputTokens() .inputTokens() .model() .outputTokens()
-
-
-
-