Class: MistralModels::StreamedChoice
- Inherits:
-
Object
- Object
- MistralModels::StreamedChoice
- Defined in:
- lib/mistral_rb/response_models.rb
Instance Attribute Summary collapse
-
#delta ⇒ Object
readonly
Returns the value of attribute delta.
-
#finish_reason ⇒ Object
readonly
Returns the value of attribute finish_reason.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
Instance Method Summary collapse
-
#initialize(choice_hash) ⇒ StreamedChoice
constructor
A new instance of StreamedChoice.
Constructor Details
#initialize(choice_hash) ⇒ StreamedChoice
Returns a new instance of StreamedChoice.
91 92 93 94 95 |
# File 'lib/mistral_rb/response_models.rb', line 91 def initialize(choice_hash) @index = choice_hash["index"] @delta = Delta.new(choice_hash["delta"]) if choice_hash["delta"] @finish_reason = choice_hash["finish_reason"] end |
Instance Attribute Details
#delta ⇒ Object (readonly)
Returns the value of attribute delta.
89 90 91 |
# File 'lib/mistral_rb/response_models.rb', line 89 def delta @delta end |
#finish_reason ⇒ Object (readonly)
Returns the value of attribute finish_reason.
89 90 91 |
# File 'lib/mistral_rb/response_models.rb', line 89 def finish_reason @finish_reason end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
89 90 91 |
# File 'lib/mistral_rb/response_models.rb', line 89 def index @index end |