Class: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession

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

Defined Under Namespace

Classes: Agent

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(environment:, input:, agent: nil, agent_id: nil, metadata: nil, vault_ids: nil, type: :new_session) ⇒ NewSession

Returns a new instance of NewSession.

Parameters:

  • environment —

    The execution environment for each new session.

  • input —

    Initial user messages submitted with each new session.

  • agent (defaults to: nil) —

    Inline agent configuration. Provide exactly one of agent and agent_id.

  • agent_id (defaults to: nil) —

    A saved agent ID. Provide exactly one of agent and agent_id.

  • metadata (defaults to: nil) —

    Metadata attached to each new session.

  • vault_ids (defaults to: nil) —

    The IDs of vaults made available to each new session.

  • type (defaults to: :new_session) —

    The type of the object. Always new_session.

  • environment: (OpenAI::Models::Beta::environment_param)
  • input: (::Array[OpenAI::Beta::AgentSessionInputMessageParam])
  • agent: (OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent) (defaults to: nil)
  • agent_id: (String) (defaults to: nil)
  • metadata: (::Hash[Symbol, String], nil) (defaults to: nil)
  • vault_ids: (::Array[String], nil) (defaults to: nil)
  • type: (:new_session) (defaults to: :new_session)


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

Instance Attribute Details

#agent ⇒ OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent?

Inline agent configuration. Provide exactly one of agent and agent_id.

Returns:

  • (OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent, nil)


42
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 42

optional :agent, -> { OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent }

#agent_id ⇒ String?

A saved agent ID. Provide exactly one of agent and agent_id.

Returns:

  • (String, nil)


48
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 48

optional :agent_id, String

#environment ⇒ OpenAI::Models::Beta::environment_param

The execution environment for each new session.

Returns:

  • (OpenAI::Models::Beta::environment_param)


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

required :environment, union: -> { OpenAI::Beta::EnvironmentParam }

#input ⇒ ::Array[OpenAI::Beta::AgentSessionInputMessageParam]

Initial user messages submitted with each new session.

Returns:

  • (::Array[OpenAI::Beta::AgentSessionInputMessageParam])


30
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 30

required :input, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::AgentSessionInputMessageParam] }

#metadata ⇒ ::Hash[Symbol, String]?

Metadata attached to each new session.

Returns:

  • (::Hash[Symbol, String], nil)


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

optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#type ⇒ :new_session

The type of the object. Always new_session.

Returns:

  • (:new_session)


36
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 36

required :type, const: :new_session

#vault_ids ⇒ ::Array[String]?

The IDs of vaults made available to each new session.

Returns:

  • (::Array[String], nil)


60
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 60

optional :vault_ids, OpenAI::Internal::Type::ArrayOf[String], nil?: true

Instance Method Details

#to_hash ⇒ { environment: OpenAI::Models::Beta::environment_param, input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam], ?type: :new_session, ?agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent, ?agent_id: String, ?metadata: ::Hash[Symbol, String]?, ?vault_ids: ::Array[String]? }

Returns:

  • ({ environment: OpenAI::Models::Beta::environment_param, input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam], ?type: :new_session, ?agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent, ?agent_id: String, ?metadata: ::Hash[Symbol, String]?, ?vault_ids: ::Array[String]? })


77
78
79
80
81
82
83
84
85
# File 'sig/openai/models/beta/agents/automation_target_param.rbs', line 77

def to_hash: -> {
  environment: OpenAI::Models::Beta::environment_param,
  input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam],
  ?type: :new_session,
  ?agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent,
  ?agent_id: String,
  ?metadata: ::Hash[Symbol, String]?,
  ?vault_ids: ::Array[String]?
}