Class: OpenAI::Models::Admin::Organization::Health::AlertRuleUpdateParams::Condition::PromptCacheHitRate

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/admin/organization/health/alert_rule_update_params.rb,
sig/openai/models/admin/organization/health/alert_rule_update_params.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 ⇒ PromptCacheHitRate

Returns a new instance of PromptCacheHitRate.

Parameters:

  • threshold: (Float)
  • type: (:prompt_cache_hit_rate)


287
288
289
290
# File 'sig/openai/models/admin/organization/health/alert_rule_update_params.rbs', line 287

def initialize: (
  threshold: Float,
  ?type: :prompt_cache_hit_rate
) -> void

Instance Attribute Details

#threshold ⇒ Float

Parameters:

  • value (Float)

Returns:

  • (Float)


161
# File 'lib/openai/models/admin/organization/health/alert_rule_update_params.rb', line 161

required :threshold, Float

#type ⇒ Symbol, :prompt_cache_hit_rate

Parameters:

  • value (:prompt_cache_hit_rate)

Returns:

  • (Symbol, :prompt_cache_hit_rate)


166
# File 'lib/openai/models/admin/organization/health/alert_rule_update_params.rb', line 166

required :type, const: :prompt_cache_hit_rate

Instance Method Details

#to_hash ⇒ { threshold: Float, ?type: :prompt_cache_hit_rate }

Returns:

  • ({ threshold: Float, ?type: :prompt_cache_hit_rate })


292
293
294
295
# File 'sig/openai/models/admin/organization/health/alert_rule_update_params.rbs', line 292

def to_hash: -> {
  threshold: Float,
  ?type: :prompt_cache_hit_rate
}