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
Returns a new instance of 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)
Returns If applicable, the ID of the assistant that authored this message.
36 37 38 |
# File 'lib/openai/models/message.rb', line 36 def assistant_id @assistant_id end |
#attachments ⇒ String (readonly)
Returns A list of files attached to the message, and the tools they were added to.
42 43 44 |
# File 'lib/openai/models/message.rb', line 42 def end |
#completed_at ⇒ Integer | nil (readonly)
Returns The Unix timestamp (in seconds) for when the message was completed.
24 25 26 |
# File 'lib/openai/models/message.rb', line 24 def completed_at @completed_at end |
#content ⇒ String (readonly)
Returns The content of the message in array of text and/or images.
33 34 35 |
# File 'lib/openai/models/message.rb', line 33 def content @content end |
#created_at ⇒ Integer (readonly)
Returns The Unix timestamp (in seconds) for when the message was created.
12 13 14 |
# File 'lib/openai/models/message.rb', line 12 def created_at @created_at end |
#id ⇒ String (readonly)
Returns The identifier, which can be referenced in API endpoints.
6 7 8 |
# File 'lib/openai/models/message.rb', line 6 def id @id end |
#incomplete_at ⇒ Integer | nil (readonly)
Returns The Unix timestamp (in seconds) for when the message was marked as incomplete.
27 28 29 |
# File 'lib/openai/models/message.rb', line 27 def incomplete_at @incomplete_at end |
#incomplete_details ⇒ String | nil (readonly)
Returns On an incomplete message, details about why the message is incomplete.
21 22 23 |
# File 'lib/openai/models/message.rb', line 21 def incomplete_details @incomplete_details end |
#metadata ⇒ Hash[String, String] (readonly)
Returns Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.
45 46 47 |
# File 'lib/openai/models/message.rb', line 45 def end |
#object ⇒ String (readonly)
Returns The object type, which is always thread.message.
9 10 11 |
# File 'lib/openai/models/message.rb', line 9 def object @object end |
#role ⇒ String (readonly)
Returns The entity that produced the message. One of user or assistant.
30 31 32 |
# File 'lib/openai/models/message.rb', line 30 def role @role end |
#run_id ⇒ String | nil (readonly)
Returns The ID of the run associated with the creation of this message. Value is null when messages are created manually using the create message or create thread endpoints.
39 40 41 |
# File 'lib/openai/models/message.rb', line 39 def run_id @run_id end |
#status ⇒ String (readonly)
Returns The status of the message, which can be either in_progress, incomplete, or completed.
18 19 20 |
# File 'lib/openai/models/message.rb', line 18 def status @status end |
#thread_id ⇒ Integer (readonly)
Returns The thread ID that this message belongs to.
15 16 17 |
# File 'lib/openai/models/message.rb', line 15 def thread_id @thread_id end |