Class RateLimitsUpdatedEvent
-
- All Implemented Interfaces:
public final class RateLimitsUpdatedEventEmitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be "reserved" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRateLimitsUpdatedEvent.BuilderA builder for RateLimitsUpdatedEvent.
public final classRateLimitsUpdatedEvent.RateLimit
-
Method Summary
Modifier and Type Method Description final StringeventId()The unique ID of the server event. final List<RateLimitsUpdatedEvent.RateLimit>rateLimits()List of rate limit information. final JsonValue_type()The event type, must be rate_limits.updated.final JsonField<String>_eventId()Returns the raw JSON value of eventId. final JsonField<List<RateLimitsUpdatedEvent.RateLimit>>_rateLimits()Returns the raw JSON value of rateLimits. final Map<String, JsonValue>_additionalProperties()final RateLimitsUpdatedEvent.BuildertoBuilder()final RateLimitsUpdatedEventvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RateLimitsUpdatedEvent.Builderbuilder()Returns a mutable builder for constructing an instance of RateLimitsUpdatedEvent. -
-
Method Detail
-
rateLimits
final List<RateLimitsUpdatedEvent.RateLimit> rateLimits()
List of rate limit information.
-
_type
final JsonValue _type()
The event type, must be
rate_limits.updated.Expected to always return the following:
JsonValue.from("rate_limits.updated")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_eventId
final JsonField<String> _eventId()
Returns the raw JSON value of eventId.
Unlike eventId, this method doesn't throw if the JSON field has an unexpected type.
-
_rateLimits
final JsonField<List<RateLimitsUpdatedEvent.RateLimit>> _rateLimits()
Returns the raw JSON value of rateLimits.
Unlike rateLimits, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RateLimitsUpdatedEvent.Builder toBuilder()
-
validate
final RateLimitsUpdatedEvent 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 RateLimitsUpdatedEvent.Builder builder()
Returns a mutable builder for constructing an instance of RateLimitsUpdatedEvent.
The following fields are required:
.eventId() .rateLimits()
-
-
-
-