Class: OpenAI::Models::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/admin/organization/health/health_alert.rb,
sig/openai/models/admin/organization/health/health_alert.rbs

Defined Under Namespace

Modules: SourceTier

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(eligible_attempt_count:, fallback_count:, source_tier:, threshold:, value:, type: :service_tier_fallback_rate) ⇒ ServiceTierFallbackRate

Returns a new instance of ServiceTierFallbackRate.

Parameters:

  • eligible_attempt_count —

    Eligible routing attempts in the evaluated window.

  • fallback_count —

    Eligible attempts downgraded to standard due to capacity.

  • source_tier —

    Effective requested service tier.

  • value —

    Fallback count divided by eligible attempt count.

  • eligible_attempt_count: (Integer)
  • fallback_count: (Integer)
  • source_tier: (OpenAI::Models::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate::source_tier)
  • threshold: (Float)
  • value: (Float)
  • type: (:service_tier_fallback_rate) (defaults to: :service_tier_fallback_rate)


# File 'lib/openai/models/admin/organization/health/health_alert.rb', line 338

Instance Attribute Details

#eligible_attempt_count ⇒ Integer

Eligible routing attempts in the evaluated window.

Returns:

  • (Integer)


303
# File 'lib/openai/models/admin/organization/health/health_alert.rb', line 303

required :eligible_attempt_count, Integer

#fallback_count ⇒ Integer

Eligible attempts downgraded to standard due to capacity.

Returns:

  • (Integer)


309
# File 'lib/openai/models/admin/organization/health/health_alert.rb', line 309

required :fallback_count, Integer

#source_tier ⇒ OpenAI::Models::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate::source_tier

Effective requested service tier.

Returns:

  • (OpenAI::Models::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate::source_tier)


315
316
317
318
319
320
# File 'lib/openai/models/admin/organization/health/health_alert.rb', line 315

required(
  :source_tier,
  enum: -> {
    OpenAI::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate::SourceTier
  }
)

#threshold ⇒ Float

Parameters:

  • value (Float)

Returns:

  • (Float)


325
# File 'lib/openai/models/admin/organization/health/health_alert.rb', line 325

required :threshold, Float

#type ⇒ Symbol, :service_tier_fallback_rate

Parameters:

  • value (:service_tier_fallback_rate)

Returns:

  • (Symbol, :service_tier_fallback_rate)


330
# File 'lib/openai/models/admin/organization/health/health_alert.rb', line 330

required :type, const: :service_tier_fallback_rate

#value ⇒ Float

Fallback count divided by eligible attempt count.

Returns:

  • (Float)


336
# File 'lib/openai/models/admin/organization/health/health_alert.rb', line 336

required :value, Float

Instance Method Details

#to_hash ⇒ { eligible_attempt_count: Integer, fallback_count: Integer, source_tier: OpenAI::Models::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate::source_tier, threshold: Float, ?type: :service_tier_fallback_rate, value: Float }

Returns:

  • ({ eligible_attempt_count: Integer, fallback_count: Integer, source_tier: OpenAI::Models::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate::source_tier, threshold: Float, ?type: :service_tier_fallback_rate, value: Float })


326
327
328
329
330
331
332
333
# File 'sig/openai/models/admin/organization/health/health_alert.rbs', line 326

def to_hash: -> {
  eligible_attempt_count: Integer,
  fallback_count: Integer,
  source_tier: OpenAI::Models::Admin::Organization::Health::HealthAlert::Measurement::ServiceTierFallbackRate::source_tier,
  threshold: Float,
  ?type: :service_tier_fallback_rate,
  value: Float
}