Class: OpenAI::Models::Decision::Answer::Choice::Probability
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Decision::Answer::Choice::Probability
- Defined in:
- lib/openai/models/decision.rb,
sig/openai/models/decision.rbs
Defined Under Namespace
Modules: Value
Instance Attribute Summary collapse
- #probability ⇒ Float
-
#value ⇒ OpenAI::Models::Decision::Answer::Choice::Probability::value
Choice values are typed: a string and a boolean with the same text are distinct.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(probability:, value:) ⇒ Probability
constructor
A new instance of Probability.
- #to_hash ⇒ { probability: Float, value: OpenAI::Models::Decision::Answer::Choice::Probability::value }
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(probability:, value:) ⇒ Probability
Returns a new instance of Probability.
|
|
# File 'lib/openai/models/decision.rb', line 150
|
Instance Attribute Details
#probability ⇒ Float
142 |
# File 'lib/openai/models/decision.rb', line 142 required :probability, Float |
#value ⇒ OpenAI::Models::Decision::Answer::Choice::Probability::value
Choice values are typed: a string and a boolean with the same text are distinct.
148 |
# File 'lib/openai/models/decision.rb', line 148 required :value, union: -> { OpenAI::Decision::Answer::Choice::Probability::Value } |
Instance Method Details
#to_hash ⇒ { probability: Float, value: OpenAI::Models::Decision::Answer::Choice::Probability::value }
146 147 148 149 |
# File 'sig/openai/models/decision.rbs', line 146
def to_hash: -> {
probability: Float,
value: OpenAI::Models::Decision::Answer::Choice::Probability::value
}
|