Class: OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/realtime/rate_limits_updated_event.rb

Defined Under Namespace

Modules: Name

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(limit: nil, name: nil, remaining: nil, reset_seconds: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit for more details.

Parameters:

  • limit (Integer) (defaults to: nil)

    The maximum allowed value for the rate limit.

  • name (Symbol, OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit::Name) (defaults to: nil)

    The name of the rate limit (‘requests`, `tokens`).

  • remaining (Integer) (defaults to: nil)

    The remaining value before the limit is reached.

  • reset_seconds (Float) (defaults to: nil)

    Seconds until the rate limit resets.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/openai/models/realtime/rate_limits_updated_event.rb', line 38

class RateLimit < OpenAI::Internal::Type::BaseModel
  # @!attribute limit
  #   The maximum allowed value for the rate limit.
  #
  #   @return [Integer, nil]
  optional :limit, Integer

  # @!attribute name
  #   The name of the rate limit (`requests`, `tokens`).
  #
  #   @return [Symbol, OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit::Name, nil]
  optional :name, enum: -> { OpenAI::Realtime::RateLimitsUpdatedEvent::RateLimit::Name }

  # @!attribute remaining
  #   The remaining value before the limit is reached.
  #
  #   @return [Integer, nil]
  optional :remaining, Integer

  # @!attribute reset_seconds
  #   Seconds until the rate limit resets.
  #
  #   @return [Float, nil]
  optional :reset_seconds, Float

  # @!method initialize(limit: nil, name: nil, remaining: nil, reset_seconds: nil)
  #   Some parameter documentations has been truncated, see
  #   {OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit} for more details.
  #
  #   @param limit [Integer] The maximum allowed value for the rate limit.
  #
  #   @param name [Symbol, OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit::Name] The name of the rate limit (`requests`, `tokens`).
  #
  #   @param remaining [Integer] The remaining value before the limit is reached.
  #
  #   @param reset_seconds [Float] Seconds until the rate limit resets.

  # The name of the rate limit (`requests`, `tokens`).
  #
  # @see OpenAI::Models::Realtime::RateLimitsUpdatedEvent::RateLimit#name
  module Name
    extend OpenAI::Internal::Type::Enum

    REQUESTS = :requests
    TOKENS = :tokens

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#limitInteger?

The maximum allowed value for the rate limit.

Returns:

  • (Integer, nil)


43
# File 'lib/openai/models/realtime/rate_limits_updated_event.rb', line 43

optional :limit, Integer

#nameSymbol, ...

The name of the rate limit (‘requests`, `tokens`).



49
# File 'lib/openai/models/realtime/rate_limits_updated_event.rb', line 49

optional :name, enum: -> { OpenAI::Realtime::RateLimitsUpdatedEvent::RateLimit::Name }

#remainingInteger?

The remaining value before the limit is reached.

Returns:

  • (Integer, nil)


55
# File 'lib/openai/models/realtime/rate_limits_updated_event.rb', line 55

optional :remaining, Integer

#reset_secondsFloat?

Seconds until the rate limit resets.

Returns:

  • (Float, nil)


61
# File 'lib/openai/models/realtime/rate_limits_updated_event.rb', line 61

optional :reset_seconds, Float