Class BetaDreamUsage
-
- All Implemented Interfaces:
public final class BetaDreamUsageThe tokens that a dream has used so far.
The counts are zero while the dream is
pendingand update while it isrunning. They can keep changing after a cancel.See the Dreams guide for how dreams are billed. See the prompt caching guide for how the input token counts add up.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaDreamUsage.BuilderA builder for BetaDreamUsage.
-
Method Summary
Modifier and Type Method Description final IntegercacheCreationInputTokens()The dream's input tokens that were written to the prompt cache, for both the 5-minute and 1-hour cache durations. final IntegercacheReadInputTokens()The dream's input tokens that were read from the prompt cache. final IntegerinputTokens()The dream's input tokens that weren't read from or written to the prompt cache. final IntegeroutputTokens()The tokens that the model generated for the dream. final JsonField<Integer>_cacheCreationInputTokens()Returns the raw JSON value of cacheCreationInputTokens. final JsonField<Integer>_cacheReadInputTokens()Returns the raw JSON value of cacheReadInputTokens. final JsonField<Integer>_inputTokens()Returns the raw JSON value of inputTokens. final JsonField<Integer>_outputTokens()Returns the raw JSON value of outputTokens. final Map<String, JsonValue>_additionalProperties()final BetaDreamUsage.BuildertoBuilder()final BetaDreamUsagevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaDreamUsage.Builderbuilder()Returns a mutable builder for constructing an instance of BetaDreamUsage. -
-
Method Detail
-
cacheCreationInputTokens
final Integer cacheCreationInputTokens()
The dream's input tokens that were written to the prompt cache, for both the 5-minute and 1-hour cache durations.
-
cacheReadInputTokens
final Integer cacheReadInputTokens()
The dream's input tokens that were read from the prompt cache.
-
inputTokens
final Integer inputTokens()
The dream's input tokens that weren't read from or written to the prompt cache.
-
outputTokens
final Integer outputTokens()
The tokens that the model generated for the dream.
-
_cacheCreationInputTokens
final JsonField<Integer> _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<Integer> _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<Integer> _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<Integer> _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 BetaDreamUsage.Builder toBuilder()
-
validate
final BetaDreamUsage 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 BetaDreamUsage.Builder builder()
Returns a mutable builder for constructing an instance of BetaDreamUsage.
The following fields are required:
.cacheCreationInputTokens() .cacheReadInputTokens() .inputTokens() .outputTokens()
-
-
-
-