Class: Files::ChatMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/chat_message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/chat_message.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/chat_message.rb', line 5

def options
  @options
end

Instance Method Details

#contentObject

string - Message content.



23
24
25
# File 'lib/files.com/models/chat_message.rb', line 23

def content
  @attributes[:content]
end

#created_atObject

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

#idObject

int64 - Chat Message ID.



13
14
15
# File 'lib/files.com/models/chat_message.rb', line 13

def id
  @attributes[:id]
end

#roleObject

string - Message role.



18
19
20
# File 'lib/files.com/models/chat_message.rb', line 18

def role
  @attributes[:role]
end