Class: OpenAI::Model::Message
- Inherits:
-
Object
- Object
- OpenAI::Model::Message
- Defined in:
- lib/openai/models/message.rb
Instance Attribute Summary collapse
-
#assistant_id ⇒ String | nil
readonly
If applicable, the ID of the assistant that authored this message.
-
#attachments ⇒ String
readonly
A list of files attached to the message, and the tools they were added to.
-
#completed_at ⇒ Integer | nil
readonly
The Unix timestamp (in seconds) for when the message was completed.
-
#content ⇒ String
readonly
The content of the message in array of text and/or images.
-
#created_at ⇒ Integer
readonly
The Unix timestamp (in seconds) for when the message was created.
-
#id ⇒ String
readonly
The identifier, which can be referenced in API endpoints.
-
#incomplete_at ⇒ Integer | nil
readonly
The Unix timestamp (in seconds) for when the message was marked as incomplete.
-
#incomplete_details ⇒ String | nil
readonly
On an incomplete message, details about why the message is incomplete.
-
#metadata ⇒ Hash[String, String]
readonly
Set of 16 key-value pairs that can be attached to an object.
-
#object ⇒ String
readonly
The object type, which is always thread.message.
-
#role ⇒ String
readonly
The entity that produced the message.
-
#run_id ⇒ String | nil
readonly
The ID of the run associated with the creation of this message.
-
#status ⇒ String
readonly
The status of the message, which can be either in_progress, incomplete, or completed.
-
#thread_id ⇒ Integer
readonly
The thread ID that this message belongs to.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(attributes) ⇒ Message
47 48 49 50 51 |
# File 'lib/openai/models/message.rb', line 47 def initialize(attributes) attributes.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#assistant_id ⇒ String | nil (readonly)
36 37 38 |
# File 'lib/openai/models/message.rb', line 36 def assistant_id @assistant_id end |
#attachments ⇒ String (readonly)
42 43 44 |
# File 'lib/openai/models/message.rb', line 42 def end |
#completed_at ⇒ Integer | nil (readonly)
24 25 26 |
# File 'lib/openai/models/message.rb', line 24 def completed_at @completed_at end |
#content ⇒ String (readonly)
33 34 35 |
# File 'lib/openai/models/message.rb', line 33 def content @content end |
#created_at ⇒ Integer (readonly)
12 13 14 |
# File 'lib/openai/models/message.rb', line 12 def created_at @created_at end |
#id ⇒ String (readonly)
6 7 8 |
# File 'lib/openai/models/message.rb', line 6 def id @id end |
#incomplete_at ⇒ Integer | nil (readonly)
27 28 29 |
# File 'lib/openai/models/message.rb', line 27 def incomplete_at @incomplete_at end |
#incomplete_details ⇒ String | nil (readonly)
21 22 23 |
# File 'lib/openai/models/message.rb', line 21 def incomplete_details @incomplete_details end |
#metadata ⇒ Hash[String, String] (readonly)
45 46 47 |
# File 'lib/openai/models/message.rb', line 45 def end |
#object ⇒ String (readonly)
9 10 11 |
# File 'lib/openai/models/message.rb', line 9 def object @object end |
#role ⇒ String (readonly)
30 31 32 |
# File 'lib/openai/models/message.rb', line 30 def role @role end |
#run_id ⇒ String | nil (readonly)
39 40 41 |
# File 'lib/openai/models/message.rb', line 39 def run_id @run_id end |
#status ⇒ String (readonly)
18 19 20 |
# File 'lib/openai/models/message.rb', line 18 def status @status end |
#thread_id ⇒ Integer (readonly)
15 16 17 |
# File 'lib/openai/models/message.rb', line 15 def thread_id @thread_id end |