Class: OpenAI::Models::Beta::Threads::Message

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/threads/message.rb

Overview

Defined Under Namespace

Modules: Role, Status Classes: Attachment, IncompleteDetails

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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, meta_info, new_coerce_state, 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 174


Instance Attribute Details

#assistant_idString?

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

#attachmentsArray<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_atInteger?

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

#contentArray<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
# File 'lib/openai/models/beta/threads/message.rb', line 41

required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::Threads::MessageContent] }

#created_atInteger

The Unix timestamp (in seconds) for when the message was created.



47
# File 'lib/openai/models/beta/threads/message.rb', line 47

required :created_at, Integer

#idString

The identifier, which can be referenced in API endpoints.



13
# File 'lib/openai/models/beta/threads/message.rb', line 13

required :id, String

#incomplete_atInteger?

The Unix timestamp (in seconds) for when the message was marked as incomplete.



53
# File 'lib/openai/models/beta/threads/message.rb', line 53

required :incomplete_at, Integer, nil?: true

#incomplete_detailsOpenAI::Models::Beta::Threads::Message::IncompleteDetails?

On an incomplete message, details about why the message is incomplete.



59
# File 'lib/openai/models/beta/threads/message.rb', line 59

required :incomplete_details, -> { OpenAI::Beta::Threads::Message::IncompleteDetails }, nil?: true

#metadataHash{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.



70
# File 'lib/openai/models/beta/threads/message.rb', line 70

required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#objectSymbol, :"thread.message"

The object type, which is always ‘thread.message`.



76
# File 'lib/openai/models/beta/threads/message.rb', line 76

required :object, const: :"thread.message"

#roleSymbol, OpenAI::Models::Beta::Threads::Message::Role

The entity that produced the message. One of ‘user` or `assistant`.



82
# File 'lib/openai/models/beta/threads/message.rb', line 82

required :role, enum: -> { OpenAI::Beta::Threads::Message::Role }

#run_idString?

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.



90
# File 'lib/openai/models/beta/threads/message.rb', line 90

required :run_id, String, nil?: true

#statusSymbol, OpenAI::Models::Beta::Threads::Message::Status

The status of the message, which can be either ‘in_progress`, `incomplete`, or `completed`.



97
# File 'lib/openai/models/beta/threads/message.rb', line 97

required :status, enum: -> { OpenAI::Beta::Threads::Message::Status }

#thread_idString

The [thread](platform.openai.com/docs/api-reference/threads) ID that this message belongs to.



104
# File 'lib/openai/models/beta/threads/message.rb', line 104

required :thread_id, String

Class Method Details

.valuesArray<Symbol>



# File 'lib/openai/models/beta/threads/message.rb', line 208


.variantsArray(OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::Threads::Message::Attachment::Tool::AssistantToolsFileSearchTypeOnly)



# File 'lib/openai/models/beta/threads/message.rb', line 178