Class: OpenAI::Models::Responses::ResponseOutputMessage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::ResponseOutputMessage
- Defined in:
- lib/openai/models/responses/response_output_message.rb,
sig/openai/models/responses/response_output_message.rbs
Defined Under Namespace
Modules: Content, Phase, Status
Instance Attribute Summary collapse
-
#content ⇒ ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content]
The content of the output message.
-
#id ⇒ String
The unique ID of the output message.
-
#phase ⇒ OpenAI::Models::Responses::ResponseOutputMessage::phase?
Labels an
assistantmessage as intermediate commentary (commentary) or the final answer (final_answer). -
#role ⇒ :assistant
The role of the output message.
-
#status ⇒ OpenAI::Models::Responses::ResponseOutputMessage::status
The status of the message input.
-
#type ⇒ :message
The type of the output message.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)
Instance Method Summary collapse
- #initialize(id:, content:, status:, phase: nil, role: :assistant, type: :message) ⇒ Object constructor
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(id:, content:, status:, phase: nil, role: :assistant, type: :message) ⇒ Object
|
|
# File 'lib/openai/models/responses/response_output_message.rb', line 50
|
Instance Attribute Details
#content ⇒ ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content]
The content of the output message.
17 18 19 20 |
# File 'lib/openai/models/responses/response_output_message.rb', line 17 required( :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ResponseOutputMessage::Content] } ) |
#id ⇒ String
The unique ID of the output message.
11 |
# File 'lib/openai/models/responses/response_output_message.rb', line 11 required :id, String |
#phase ⇒ OpenAI::Models::Responses::ResponseOutputMessage::phase?
Labels an assistant message as intermediate commentary (commentary) or the
final answer (final_answer). For models like gpt-5.3-codex and beyond, when
sending follow-up requests, preserve and resend phase on all assistant messages
— dropping it can degrade performance. Not used for user messages.
48 |
# File 'lib/openai/models/responses/response_output_message.rb', line 48 optional :phase, enum: -> { OpenAI::Responses::ResponseOutputMessage::Phase }, nil?: true |
#role ⇒ :assistant
The role of the output message. Always assistant.
26 |
# File 'lib/openai/models/responses/response_output_message.rb', line 26 required :role, const: :assistant |
#status ⇒ OpenAI::Models::Responses::ResponseOutputMessage::status
The status of the message input. One of in_progress, completed, or
incomplete. Populated when input items are returned via API.
33 |
# File 'lib/openai/models/responses/response_output_message.rb', line 33 required :status, enum: -> { OpenAI::Responses::ResponseOutputMessage::Status } |
#type ⇒ :message
The type of the output message. Always message.
39 |
# File 'lib/openai/models/responses/response_output_message.rb', line 39 required :type, const: :message |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/responses/response_output_message.rb', line 102
|
.variants ⇒ Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)
|
|
# File 'lib/openai/models/responses/response_output_message.rb', line 87
|
Instance Method Details
#to_hash ⇒ {
62 |
# File 'sig/openai/models/responses/response_output_message.rbs', line 62
def to_hash: -> {
|