Class: OpenAI::Models::Beta::BetaResponseOutputMessage

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_response_output_message.rb,
sig/openai/models/beta/beta_response_output_message.rbs

Defined Under Namespace

Modules: Content, Phase, Status Classes: Agent

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(agent_name:) ⇒ Object

The agent that produced this item.

Parameters:

  • agent_name (String)

    The canonical name of the agent that produced this item.



# File 'lib/openai/models/beta/beta_response_output_message.rb', line 54

Instance Attribute Details

#agentOpenAI::Models::Beta::BetaResponseOutputMessage::Agent?

The agent that produced this item.

Parameters:

  • value (OpenAI::Beta::BetaResponseOutputMessage::Agent, nil)

Returns:



43
# File 'lib/openai/models/beta/beta_response_output_message.rb', line 43

optional :agent, -> { OpenAI::Beta::BetaResponseOutputMessage::Agent }, nil?: true

#contentArray<OpenAI::Models::Beta::BetaResponseOutputText, OpenAI::Models::Beta::BetaResponseOutputRefusal>

The content of the output message.

Parameters:

  • value (::Array[OpenAI::Models::Beta::BetaResponseOutputMessage::content])

Returns:



17
18
# File 'lib/openai/models/beta/beta_response_output_message.rb', line 17

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

#idString

The unique ID of the output message.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_response_output_message.rb', line 11

required :id, String

#phaseSymbol, ...

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.

Parameters:

  • value (OpenAI::Models::Beta::BetaResponseOutputMessage::phase, nil)

Returns:



52
# File 'lib/openai/models/beta/beta_response_output_message.rb', line 52

optional :phase, enum: -> { OpenAI::Beta::BetaResponseOutputMessage::Phase }, nil?: true

#roleSymbol, :assistant

The role of the output message. Always assistant.

Parameters:

  • value (:assistant)

Returns:

  • (Symbol, :assistant)


24
# File 'lib/openai/models/beta/beta_response_output_message.rb', line 24

required :role, const: :assistant

#statusSymbol, OpenAI::Models::Beta::BetaResponseOutputMessage::Status

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

Parameters:

  • value (OpenAI::Models::Beta::BetaResponseOutputMessage::status)

Returns:



31
# File 'lib/openai/models/beta/beta_response_output_message.rb', line 31

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

#typeSymbol, :message

The type of the output message. Always message.

Parameters:

  • value (:message)

Returns:

  • (Symbol, :message)


37
# File 'lib/openai/models/beta/beta_response_output_message.rb', line 37

required :type, const: :message

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response_output_message.rb', line 101

Instance Method Details

#to_hash{

Returns:

  • ({)


42
# File 'sig/openai/models/beta/beta_response_output_message.rbs', line 42

def to_hash: -> {