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, 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

Parameters:

  • type (Symbol, :file_search) (defaults to: :file_search)

    The type of tool being defined: ‘file_search`



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

Instance Attribute Details

#assistant_idString?

If applicable, the ID of the [assistant](platform.openai.com/docs/api-reference/assistants) that authored this message.

Returns:

  • (String, nil)


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.

Returns:

  • (Integer, nil)


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

required :completed_at, Integer, nil?: true

#created_atInteger

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

Returns:

  • (Integer)


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

required :created_at, Integer

#idString

The identifier, which can be referenced in API endpoints.

Returns:

  • (String)


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.

Returns:

  • (Integer, nil)


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

required :incomplete_at, Integer, nil?: true

#incomplete_detailsOpenAI::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

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

Returns:

  • (Hash{Symbol=>String}, nil)


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

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

#objectSymbol, :"thread.message"

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

Returns:

  • (Symbol, :"thread.message")


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

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

#roleSymbol, 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_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.

Returns:

  • (String, nil)


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

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`.



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

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.

Returns:

  • (String)


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

required :thread_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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