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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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 ⇒ AgentMessage

Returns a new instance of AgentMessage.

Parameters:

  • id —

    The ID of the message.

  • content —

    The content exchanged between the agents.

  • recipient_agent_id —

    The ID or name of the receiving agent.

  • sender_agent_id —

    The ID or name of the sending agent.

  • turn_id —

    The ID of the turn that contains this item.

  • type —

    The item type. Always agent_message.

  • id: (String)
  • content: (::Array[OpenAI::Models::Beta::agent_content])
  • recipient_agent_id: (String)
  • sender_agent_id: (String)
  • turn_id: (String)
  • type: (:agent_message)


135
136
137
138
139
140
141
142
# File 'sig/openai/models/beta/agent_session_item.rbs', line 135

def initialize: (
  id: String,
  content: ::Array[OpenAI::Models::Beta::agent_content],
  recipient_agent_id: String,
  sender_agent_id: String,
  turn_id: String,
  ?type: :agent_message
) -> void

Instance Attribute Details

#content ⇒ ::Array[OpenAI::Models::Beta::agent_content]

The content exchanged between the agents.

Returns:

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


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

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

#id ⇒ String

The ID of the message.

Returns:

  • (String)


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

required :id, String

#recipient_agent_id ⇒ String

The ID or name of the receiving agent.

Returns:

  • (String)


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

required :recipient_agent_id, String

#sender_agent_id ⇒ String

The ID or name of the sending agent.

Returns:

  • (String)


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

required :sender_agent_id, String

#turn_id ⇒ String

The ID of the turn that contains this item.

Returns:

  • (String)


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

required :turn_id, String

#type ⇒ :agent_message

The item type. Always agent_message.

Returns:

  • (:agent_message)


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

required :type, const: :agent_message

Instance Method Details

#to_hash ⇒ { id: String, content: ::Array[OpenAI::Models::Beta::agent_content], recipient_agent_id: String, sender_agent_id: String, turn_id: String, ?type: :agent_message }

Returns:

  • ({ id: String, content: ::Array[OpenAI::Models::Beta::agent_content], recipient_agent_id: String, sender_agent_id: String, turn_id: String, ?type: :agent_message })


144
145
146
147
148
149
150
151
# File 'sig/openai/models/beta/agent_session_item.rbs', line 144

def to_hash: -> {
  id: String,
  content: ::Array[OpenAI::Models::Beta::agent_content],
  recipient_agent_id: String,
  sender_agent_id: String,
  turn_id: String,
  ?type: :agent_message
}