Class: OpenAI::Models::Conversations::Message

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

Defined Under Namespace

Modules: Content, Role, Status

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(text:, type: :reasoning_text) ⇒ Object

Reasoning text from the model.

Parameters:

  • text (String)

    The reasoning text from the model.

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

    The type of the reasoning text. Always ‘reasoning_text`.



# File 'lib/openai/models/conversations/message.rb', line 39

Instance Attribute Details

#idString

The unique ID of the message.

Returns:

  • (String)


11
# File 'lib/openai/models/conversations/message.rb', line 11

required :id, String

#roleSymbol, OpenAI::Models::Conversations::Message::Role

The role of the message. One of ‘unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`.



24
# File 'lib/openai/models/conversations/message.rb', line 24

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

#statusSymbol, OpenAI::Models::Conversations::Message::Status

The status of item. One of ‘in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.



31
# File 'lib/openai/models/conversations/message.rb', line 31

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

#typeSymbol, :message

The type of the message. Always set to ‘message`.

Returns:

  • (Symbol, :message)


37
# File 'lib/openai/models/conversations/message.rb', line 37

required :type, const: :message

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/conversations/message.rb', line 129