Class: MistralModels::Choice

Inherits:
Object
  • Object
show all
Defined in:
lib/mistral_rb/response_models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(choice_hash) ⇒ Choice

Returns a new instance of Choice.



18
19
20
21
# File 'lib/mistral_rb/response_models.rb', line 18

def initialize(choice_hash)
  @index = choice_hash["index"]
  @message = Message.new(choice_hash["message"])
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



16
17
18
# File 'lib/mistral_rb/response_models.rb', line 16

def index
  @index
end

#messageObject (readonly)

Returns the value of attribute message.



16
17
18
# File 'lib/mistral_rb/response_models.rb', line 16

def message
  @message
end