Class BetaTokenTaskBudget
-
- All Implemented Interfaces:
public final class BetaTokenTaskBudgetUser-configurable total token budget across contexts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaTokenTaskBudget.BuilderA builder for BetaTokenTaskBudget.
-
Method Summary
Modifier and Type Method Description final Longtotal()Total token budget across all contexts in the session. final JsonValue_type()The budget type. final Optional<Long>remaining()Remaining tokens in the budget. final JsonField<Long>_total()Returns the raw JSON value of total. final JsonField<Long>_remaining()Returns the raw JSON value of remaining. final Map<String, JsonValue>_additionalProperties()final BetaTokenTaskBudget.BuildertoBuilder()final BetaTokenTaskBudgetvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaTokenTaskBudget.Builderbuilder()Returns a mutable builder for constructing an instance of BetaTokenTaskBudget. -
-
Method Detail
-
_type
final JsonValue _type()
The budget type. Currently only 'tokens' is supported.
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).
-
remaining
final Optional<Long> remaining()
Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided.
-
_total
final JsonField<Long> _total()
Returns the raw JSON value of total.
Unlike total, this method doesn't throw if the JSON field has an unexpected type.
-
_remaining
final JsonField<Long> _remaining()
Returns the raw JSON value of remaining.
Unlike remaining, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaTokenTaskBudget.Builder toBuilder()
-
validate
final BetaTokenTaskBudget 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 BetaTokenTaskBudget.Builder builder()
Returns a mutable builder for constructing an instance of BetaTokenTaskBudget.
The following fields are required:
.total()
-
-
-
-