Class: OpenAI::Models::Beta::Agents::AutomationTarget::NewSession

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

Defined Under Namespace

Classes: Input

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 ⇒ NewSession

Returns a new instance of NewSession.

Parameters:

  • agent —

    The inline agent configuration, or null when agent_id is configured.

  • agent_id —

    The saved agent reference, or null when an inline agent is configured.

  • environment —

    Configuration or references used to select the execution environment.

  • input —

    Initial input delivered to each new session.

  • metadata —

    Metadata attached to each new session.

  • vault_ids —

    Vaults made available to each new session.

  • type —

    The type of the object. Always new_session.

  • agent: (OpenAI::Beta::Agents::AutomationAgentConfig, nil)
  • agent_id: (String, nil)
  • environment: (OpenAI::Models::Beta::Agents::automation_environment)
  • input: (::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input])
  • metadata: (::Hash[Symbol, String])
  • vault_ids: (::Array[String])
  • type: (:new_session)


59
60
61
62
63
64
65
66
67
# File 'sig/openai/models/beta/agents/automation_target.rbs', line 59

def initialize: (
  agent: OpenAI::Beta::Agents::AutomationAgentConfig?,
  agent_id: String?,
  environment: OpenAI::Models::Beta::Agents::automation_environment,
  input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input],
  metadata: ::Hash[Symbol, String],
  vault_ids: ::Array[String],
  ?type: :new_session
) -> void

Instance Attribute Details

#agent ⇒ OpenAI::Beta::Agents::AutomationAgentConfig?

The inline agent configuration, or null when agent_id is configured.

Returns:

  • (OpenAI::Beta::Agents::AutomationAgentConfig, nil)


22
# File 'lib/openai/models/beta/agents/automation_target.rb', line 22

required :agent, -> { OpenAI::Beta::Agents::AutomationAgentConfig }, nil?: true

#agent_id ⇒ String?

The saved agent reference, or null when an inline agent is configured.

Returns:

  • (String, nil)


28
# File 'lib/openai/models/beta/agents/automation_target.rb', line 28

required :agent_id, String, nil?: true

#environment ⇒ OpenAI::Models::Beta::Agents::automation_environment

Configuration or references used to select the execution environment.

Returns:

  • (OpenAI::Models::Beta::Agents::automation_environment)


34
# File 'lib/openai/models/beta/agents/automation_target.rb', line 34

required :environment, union: -> { OpenAI::Beta::Agents::AutomationEnvironment }

#input ⇒ ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input]

Initial input delivered to each new session.

Returns:

  • (::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input])


40
41
42
43
# File 'lib/openai/models/beta/agents/automation_target.rb', line 40

required(
  :input,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input] }
)

#metadata ⇒ ::Hash[Symbol, String]

Metadata attached to each new session.

Returns:

  • (::Hash[Symbol, String])


49
# File 'lib/openai/models/beta/agents/automation_target.rb', line 49

required :metadata, OpenAI::Internal::Type::HashOf[String]

#type ⇒ :new_session

The type of the object. Always new_session.

Returns:

  • (:new_session)


55
# File 'lib/openai/models/beta/agents/automation_target.rb', line 55

required :type, const: :new_session

#vault_ids ⇒ ::Array[String]

Vaults made available to each new session.

Returns:

  • (::Array[String])


61
# File 'lib/openai/models/beta/agents/automation_target.rb', line 61

required :vault_ids, OpenAI::Internal::Type::ArrayOf[String]

Instance Method Details

#to_hash ⇒ { agent: OpenAI::Beta::Agents::AutomationAgentConfig?, agent_id: String?, environment: OpenAI::Models::Beta::Agents::automation_environment, input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input], metadata: ::Hash[Symbol, String], ?type: :new_session, vault_ids: ::Array[String] }

Returns:

  • ({ agent: OpenAI::Beta::Agents::AutomationAgentConfig?, agent_id: String?, environment: OpenAI::Models::Beta::Agents::automation_environment, input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input], metadata: ::Hash[Symbol, String], ?type: :new_session, vault_ids: ::Array[String] })


69
70
71
72
73
74
75
76
77
# File 'sig/openai/models/beta/agents/automation_target.rbs', line 69

def to_hash: -> {
  agent: OpenAI::Beta::Agents::AutomationAgentConfig?,
  agent_id: String?,
  environment: OpenAI::Models::Beta::Agents::automation_environment,
  input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input],
  metadata: ::Hash[Symbol, String],
  ?type: :new_session,
  vault_ids: ::Array[String]
}