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

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

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 ⇒ ErrorRate

Returns a new instance of ErrorRate.

Parameters:

  • error_count —

    Requests with dimensions.http_status for per-status rules; all 5xx errors for legacy aggregate snapshots.

  • request_count —

    All matching requests, including successes and other HTTP statuses.

  • error_count: (Integer)
  • request_count: (Integer)
  • threshold: (Float)
  • value: (Float)
  • type: (:error_rate)


166
167
168
169
170
171
172
# File 'sig/openai/models/admin/organization/health/health_alert.rbs', line 166

def initialize: (
  error_count: Integer,
  request_count: Integer,
  threshold: Float,
  value: Float,
  ?type: :error_rate
) -> void

Instance Attribute Details

#error_count ⇒ Integer

Requests with dimensions.http_status for per-status rules; all 5xx errors for legacy aggregate snapshots.

Returns:

  • (Integer)


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

required :error_count, Integer

#request_count ⇒ Integer

All matching requests, including successes and other HTTP statuses.

Returns:

  • (Integer)


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

required :request_count, Integer

#threshold ⇒ Float

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :threshold, Float

#type ⇒ Symbol, :error_rate

Parameters:

  • value (:error_rate)

Returns:

  • (Symbol, :error_rate)


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

required :type, const: :error_rate

#value ⇒ Float

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :value, Float

Instance Method Details

#to_hash ⇒ { error_count: Integer, request_count: Integer, threshold: Float, ?type: :error_rate, value: Float }

Returns:

  • ({ error_count: Integer, request_count: Integer, threshold: Float, ?type: :error_rate, value: Float })


174
175
176
177
178
179
180
# File 'sig/openai/models/admin/organization/health/health_alert.rbs', line 174

def to_hash: -> {
  error_count: Integer,
  request_count: Integer,
  threshold: Float,
  ?type: :error_rate,
  value: Float
}