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

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

Returns a new instance of PromptCacheHitRate.

Parameters:

  • cached_input_token_count: (Integer)
  • input_token_count: (Integer)
  • threshold: (Float)
  • value: (Float)
  • type: (:prompt_cache_hit_rate)


203
204
205
206
207
208
209
# File 'sig/openai/models/admin/organization/health/health_alert.rbs', line 203

def initialize: (
  cached_input_token_count: Integer,
  input_token_count: Integer,
  threshold: Float,
  value: Float,
  ?type: :prompt_cache_hit_rate
) -> void

Instance Attribute Details

#cached_input_token_count ⇒ Integer

Parameters:

  • value (Integer)

Returns:

  • (Integer)


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

required :cached_input_token_count, Integer

#input_token_count ⇒ Integer

Parameters:

  • value (Integer)

Returns:

  • (Integer)


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

required :input_token_count, Integer

#threshold ⇒ Float

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :threshold, Float

#type ⇒ Symbol, :prompt_cache_hit_rate

Parameters:

  • value (:prompt_cache_hit_rate)

Returns:

  • (Symbol, :prompt_cache_hit_rate)


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

required :type, const: :prompt_cache_hit_rate

#value ⇒ Float

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :value, Float

Instance Method Details

#to_hash ⇒ { cached_input_token_count: Integer, input_token_count: Integer, threshold: Float, ?type: :prompt_cache_hit_rate, value: Float }

Returns:

  • ({ cached_input_token_count: Integer, input_token_count: Integer, threshold: Float, ?type: :prompt_cache_hit_rate, value: Float })


211
212
213
214
215
216
217
# File 'sig/openai/models/admin/organization/health/health_alert.rbs', line 211

def to_hash: -> {
  cached_input_token_count: Integer,
  input_token_count: Integer,
  threshold: Float,
  ?type: :prompt_cache_hit_rate,
  value: Float
}