Class: OpenAI::Models::Beta::AgentSessionItem::AgentMessage

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

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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:, recipient_agent_id:, sender_agent_id:, turn_id:, type: :agent_message) ⇒ Object

A message exchanged between agent threads.

Parameters:

  • id (String)

    The ID of the message.

  • content (Array<OpenAI::Models::Beta::OutputText, OpenAI::Models::Beta::AgentContent::EncryptedContent>)

    The content exchanged between the agents.

  • recipient_agent_id (String)

    The ID or name of the receiving agent.

  • sender_agent_id (String)

    The ID or name of the sending agent.

  • turn_id (String)

    The ID of the turn that contains this item.

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

    The item type. Always agent_message.



# File 'lib/openai/models/beta/agent_session_item.rb', line 159

Instance Attribute Details

#contentArray<OpenAI::Models::Beta::OutputText, OpenAI::Models::Beta::AgentContent::EncryptedContent>

The content exchanged between the agents.

Parameters:

  • value (::Array[OpenAI::Models::Beta::agent_content])

Returns:



133
# File 'lib/openai/models/beta/agent_session_item.rb', line 133

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

#idString

The ID of the message.

Parameters:

  • value (String)

Returns:

  • (String)


127
# File 'lib/openai/models/beta/agent_session_item.rb', line 127

required :id, String

#recipient_agent_idString

The ID or name of the receiving agent.

Parameters:

  • value (String)

Returns:

  • (String)


139
# File 'lib/openai/models/beta/agent_session_item.rb', line 139

required :recipient_agent_id, String

#sender_agent_idString

The ID or name of the sending agent.

Parameters:

  • value (String)

Returns:

  • (String)


145
# File 'lib/openai/models/beta/agent_session_item.rb', line 145

required :sender_agent_id, String

#turn_idString

The ID of the turn that contains this item.

Parameters:

  • value (String)

Returns:

  • (String)


151
# File 'lib/openai/models/beta/agent_session_item.rb', line 151

required :turn_id, String

#typeSymbol, :agent_message

The item type. Always agent_message.

Parameters:

  • value (:agent_message)

Returns:

  • (Symbol, :agent_message)


157
# File 'lib/openai/models/beta/agent_session_item.rb', line 157

required :type, const: :agent_message

Instance Method Details

#to_hash{

Returns:

  • ({)


102
# File 'sig/openai/models/beta/agent_session_item.rbs', line 102

def to_hash: -> {