Class: OpenAI::Models::Beta::Threads::Message
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Threads::Message
- Defined in:
- lib/openai/models/beta/threads/message.rb
Overview
Defined Under Namespace
Modules: Role, Status Classes: Attachment, IncompleteDetails
Instance Attribute Summary collapse
-
#assistant_id ⇒ String?
If applicable, the ID of the [assistant](platform.openai.com/docs/api-reference/assistants) that authored this message.
-
#attachments ⇒ Array<OpenAI::Models::Beta::Threads::Message::Attachment>?
A list of files attached to the message, and the tools they were added to.
-
#completed_at ⇒ Integer?
The Unix timestamp (in seconds) for when the message was completed.
-
#content ⇒ Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlock, OpenAI::Models::Beta::Threads::RefusalContentBlock>
The content of the message in array of text and/or images.
-
#created_at ⇒ Integer
The Unix timestamp (in seconds) for when the message was created.
-
#id ⇒ String
The identifier, which can be referenced in API endpoints.
-
#incomplete_at ⇒ Integer?
The Unix timestamp (in seconds) for when the message was marked as incomplete.
-
#incomplete_details ⇒ OpenAI::Models::Beta::Threads::Message::IncompleteDetails?
On an incomplete message, details about why the message is incomplete.
-
#metadata ⇒ Hash{Symbol=>String}?
Set of 16 key-value pairs that can be attached to an object.
-
#object ⇒ Symbol, :"thread.message"
The object type, which is always ‘thread.message`.
-
#role ⇒ Symbol, OpenAI::Models::Beta::Threads::Message::Role
The entity that produced the message.
-
#run_id ⇒ String?
The ID of the [run](platform.openai.com/docs/api-reference/runs) associated with the creation of this message.
-
#status ⇒ Symbol, OpenAI::Models::Beta::Threads::Message::Status
The status of the message, which can be either ‘in_progress`, `incomplete`, or `completed`.
-
#thread_id ⇒ String
The [thread](platform.openai.com/docs/api-reference/threads) ID that this message belongs to.
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly)
Instance Method Summary collapse
- #initialize(type: :file_search) ⇒ Object constructor
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(type: :file_search) ⇒ Object
|
# File 'lib/openai/models/beta/threads/message.rb', line 181
|
Instance Attribute Details
#assistant_id ⇒ String?
If applicable, the ID of the [assistant](platform.openai.com/docs/api-reference/assistants) that authored this message.
21 |
# File 'lib/openai/models/beta/threads/message.rb', line 21 required :assistant_id, String, nil?: true |
#attachments ⇒ Array<OpenAI::Models::Beta::Threads::Message::Attachment>?
A list of files attached to the message, and the tools they were added to.
27 28 29 |
# File 'lib/openai/models/beta/threads/message.rb', line 27 required :attachments, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Threads::Message::Attachment] }, nil?: true |
#completed_at ⇒ Integer?
The Unix timestamp (in seconds) for when the message was completed.
35 |
# File 'lib/openai/models/beta/threads/message.rb', line 35 required :completed_at, Integer, nil?: true |
#content ⇒ Array<OpenAI::Models::Beta::Threads::ImageFileContentBlock, OpenAI::Models::Beta::Threads::ImageURLContentBlock, OpenAI::Models::Beta::Threads::TextContentBlock, OpenAI::Models::Beta::Threads::RefusalContentBlock>
The content of the message in array of text and/or images.
41 42 43 44 |
# File 'lib/openai/models/beta/threads/message.rb', line 41 required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::MessageContent] } |
#created_at ⇒ Integer
The Unix timestamp (in seconds) for when the message was created.
50 |
# File 'lib/openai/models/beta/threads/message.rb', line 50 required :created_at, Integer |
#id ⇒ String
The identifier, which can be referenced in API endpoints.
13 |
# File 'lib/openai/models/beta/threads/message.rb', line 13 required :id, String |
#incomplete_at ⇒ Integer?
The Unix timestamp (in seconds) for when the message was marked as incomplete.
56 |
# File 'lib/openai/models/beta/threads/message.rb', line 56 required :incomplete_at, Integer, nil?: true |
#incomplete_details ⇒ OpenAI::Models::Beta::Threads::Message::IncompleteDetails?
On an incomplete message, details about why the message is incomplete.
62 |
# File 'lib/openai/models/beta/threads/message.rb', line 62 required :incomplete_details, -> { OpenAI::Beta::Threads::Message::IncompleteDetails }, nil?: true |
#metadata ⇒ Hash{Symbol=>String}?
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, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
73 |
# File 'lib/openai/models/beta/threads/message.rb', line 73 required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true |
#object ⇒ Symbol, :"thread.message"
The object type, which is always ‘thread.message`.
79 |
# File 'lib/openai/models/beta/threads/message.rb', line 79 required :object, const: :"thread.message" |
#role ⇒ Symbol, OpenAI::Models::Beta::Threads::Message::Role
The entity that produced the message. One of ‘user` or `assistant`.
85 |
# File 'lib/openai/models/beta/threads/message.rb', line 85 required :role, enum: -> { OpenAI::Beta::Threads::Message::Role } |
#run_id ⇒ String?
The ID of the [run](platform.openai.com/docs/api-reference/runs) associated with the creation of this message. Value is ‘null` when messages are created manually using the create message or create thread endpoints.
93 |
# File 'lib/openai/models/beta/threads/message.rb', line 93 required :run_id, String, nil?: true |
#status ⇒ Symbol, OpenAI::Models::Beta::Threads::Message::Status
The status of the message, which can be either ‘in_progress`, `incomplete`, or `completed`.
100 |
# File 'lib/openai/models/beta/threads/message.rb', line 100 required :status, enum: -> { OpenAI::Beta::Threads::Message::Status } |
#thread_id ⇒ String
The [thread](platform.openai.com/docs/api-reference/threads) ID that this message belongs to.
107 |
# File 'lib/openai/models/beta/threads/message.rb', line 107 required :thread_id, String |
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/openai/models/beta/threads/message.rb', line 215
|
.variants ⇒ Array(OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly)
|
# File 'lib/openai/models/beta/threads/message.rb', line 185
|