Class: Ollama::Message
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Instance Method Summary collapse
-
#initialize(role:, content:, images: nil) ⇒ Message
constructor
A new instance of Message.
Methods included from DTO
#as_array_of_hashes, #as_json, #empty?, #to_json
Constructor Details
#initialize(role:, content:, images: nil) ⇒ Message
Returns a new instance of Message.
6 7 8 |
# File 'lib/ollama/message.rb', line 6 def initialize(role:, content:, images: nil, **) @role, @content, @images = role, content, (Array(images) if images) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/ollama/message.rb', line 4 def content @content end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
4 5 6 |
# File 'lib/ollama/message.rb', line 4 def images @images end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
4 5 6 |
# File 'lib/ollama/message.rb', line 4 def role @role end |