Class: MistralModels::Message

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message_hash) ⇒ Message

Returns a new instance of Message.



27
28
29
30
# File 'lib/mistral_rb/response_models.rb', line 27

def initialize(message_hash)
  @role = message_hash["role"]
  @content = message_hash["content"]
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



25
26
27
# File 'lib/mistral_rb/response_models.rb', line 25

def content
  @content
end

#roleObject (readonly)

Returns the value of attribute role.



25
26
27
# File 'lib/mistral_rb/response_models.rb', line 25

def role
  @role
end