Class: OpenAI::Models::Beta::Subagent

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

Defined Under Namespace

Modules: Status

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:, closed_at:, instructions:, name:, opened_at:, parent_agent_id:, session_id:, status:, object: :"agent.session.subagent") ⇒ Object

A subagent created within a session.

Parameters:

  • id (String)

    The ID of the subagent.

  • closed_at (Integer, nil)

    The Unix timestamp, in seconds, when the subagent was closed. Null while active, including after resume.

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

    Initial task content, or null when unavailable. Text may contain placeholders for images or audio when only a preview is available.

  • name (String, nil)

    The runner-assigned nickname, or null when unavailable.

  • opened_at (Integer)

    The Unix timestamp, in seconds, when the subagent was first opened. Resuming does not change it.

  • parent_agent_id (String)

    The ID of the agent that created this subagent.

  • session_id (String)

    The ID of the session that owns the subagent.

  • status (Symbol, OpenAI::Models::Beta::Subagent::Status)

    The current status of the subagent.

  • object (Symbol, :"agent.session.subagent") (defaults to: :"agent.session.subagent")

    The object type. Always agent.session.subagent.



# File 'lib/openai/models/beta/subagent.rb', line 70

Instance Attribute Details

#closed_atInteger?

The Unix timestamp, in seconds, when the subagent was closed. Null while active, including after resume.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :closed_at, Integer, nil?: true

#idString

The ID of the subagent.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#instructionsArray<OpenAI::Models::Beta::OutputText, OpenAI::Models::Beta::AgentContent::EncryptedContent>?

Initial task content, or null when unavailable. Text may contain placeholders for images or audio when only a preview is available.

Parameters:

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

Returns:



25
26
27
28
29
30
31
# File 'lib/openai/models/beta/subagent.rb', line 25

required(
  :instructions,
  -> {
    OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentContent]
  },
  nil?: true
)

#nameString?

The runner-assigned nickname, or null when unavailable.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :name, String, nil?: true

#objectSymbol, :"agent.session.subagent"

The object type. Always agent.session.subagent.

Parameters:

  • value (:"agent.session.subagent")

Returns:

  • (Symbol, :"agent.session.subagent")


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

required :object, const: :"agent.session.subagent"

#opened_atInteger

The Unix timestamp, in seconds, when the subagent was first opened. Resuming does not change it.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


50
# File 'lib/openai/models/beta/subagent.rb', line 50

required :opened_at, Integer

#parent_agent_idString

The ID of the agent that created this subagent.

Parameters:

  • value (String)

Returns:

  • (String)


56
# File 'lib/openai/models/beta/subagent.rb', line 56

required :parent_agent_id, String

#session_idString

The ID of the session that owns the subagent.

Parameters:

  • value (String)

Returns:

  • (String)


62
# File 'lib/openai/models/beta/subagent.rb', line 62

required :session_id, String

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

The current status of the subagent.

Parameters:

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

Returns:



68
# File 'lib/openai/models/beta/subagent.rb', line 68

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

Instance Method Details

#to_hash{

Returns:

  • ({)


48
# File 'sig/openai/models/beta/subagent.rbs', line 48

def to_hash: -> {