Class: OpenAI::Models::Beta::Agents::SessionCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/beta/agents/session_create_params.rb,
sig/openai/models/beta/agents/session_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::Beta::Agents::Sessions#create
  • OpenAI::Resources::Beta::Agents::Sessions#create_streaming

Defined Under Namespace

Modules: Input Classes: Agent

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

#initializeObject

Parameters:

  • environment

    An inline execution environment or a reference to an environment template.

  • agent

    Agent configuration. With agent_id, supplied fields override the saved agent for this session. Without agent_id, model is required.

  • agent_id

    The ID of a saved reusable agent. Omit agent to use its configuration unchanged.

  • input

    Initial input to submit when the session is created. A string is shorthand for a single user message. Required when environment.type is none, or when stream is true for an environment that is not self_hosted; optional for self-hosted and non-streaming execution environments.

  • metadata

    Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map.

  • vault_ids

    The IDs of vaults made available to the session.



72
# File 'sig/openai/models/beta/agents/session_create_params.rbs', line 72

def initialize: (

Instance Attribute Details

#agentOpenAI::Beta::Agents::SessionCreateParams::Agent?

Agent configuration. With agent_id, supplied fields override the saved agent for this session. Without agent_id, model is required.

Returns:

  • (OpenAI::Beta::Agents::SessionCreateParams::Agent, nil)


25
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 25

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

#agent_idString?

The ID of a saved reusable agent. Omit agent to use its configuration unchanged.

Returns:

  • (String, nil)


32
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 32

optional :agent_id, String

#environmentOpenAI::Models::Beta::environment_param

An inline execution environment or a reference to an environment template.

Returns:

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


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

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

#inputOpenAI::Models::Beta::Agents::SessionCreateParams::input?

Initial input to submit when the session is created. A string is shorthand for a single user message. Required when environment.type is none, or when stream is true for an environment that is not self_hosted; optional for self-hosted and non-streaming execution environments.

Returns:

  • (OpenAI::Models::Beta::Agents::SessionCreateParams::input, nil)


41
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 41

optional :input, union: -> { OpenAI::Beta::Agents::SessionCreateParams::Input }, nil?: true

#metadata::Hash[Symbol, String]?

Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map.

Returns:

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


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

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

#vault_ids::Array[String]?

The IDs of vaults made available to the session.

Returns:

  • (::Array[String], nil)


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

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/agents/session_create_params.rb', line 186

Instance Method Details

#to_hash{

Returns:

  • ({)


82
# File 'sig/openai/models/beta/agents/session_create_params.rbs', line 82

def to_hash: -> {