Class: Files::ChatMessage
- Inherits:
-
Object
- Object
- Files::ChatMessage
- Defined in:
- lib/files.com/models/chat_message.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#content ⇒ Object
string - Message content.
-
#created_at ⇒ Object
date-time - Message creation date/time.
-
#id ⇒ Object
int64 - Chat Message ID.
-
#initialize(attributes = {}, options = {}) ⇒ ChatMessage
constructor
A new instance of ChatMessage.
-
#role ⇒ Object
string - Message role.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ ChatMessage
Returns a new instance of ChatMessage.
7 8 9 10 |
# File 'lib/files.com/models/chat_message.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/chat_message.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/chat_message.rb', line 5 def @options end |
Instance Method Details
#content ⇒ Object
string - Message content.
23 24 25 |
# File 'lib/files.com/models/chat_message.rb', line 23 def content @attributes[:content] end |
#created_at ⇒ Object
date-time - Message creation date/time.
28 29 30 |
# File 'lib/files.com/models/chat_message.rb', line 28 def created_at @attributes[:created_at] end |
#id ⇒ Object
int64 - Chat Message ID.
13 14 15 |
# File 'lib/files.com/models/chat_message.rb', line 13 def id @attributes[:id] end |
#role ⇒ Object
string - Message role.
18 19 20 |
# File 'lib/files.com/models/chat_message.rb', line 18 def role @attributes[:role] end |