Class: OpenAI::Models::Beta::Agents::SessionCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Agents::SessionCreateParams
- 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
Defined Under Namespace
Modules: Input, Review Classes: Agent, PromptCacheOptions, SpendControl, StreamOptions
Instance Attribute Summary collapse
-
#agent ⇒ OpenAI::Beta::Agents::SessionCreateParams::Agent?
Agent configuration.
-
#agent_id ⇒ String?
The ID of a saved reusable agent.
-
#environment ⇒ OpenAI::Models::Beta::environment_param
An inline execution environment or a reference to an environment template.
-
#input ⇒ OpenAI::Models::Beta::Agents::SessionCreateParams::input?
Initial input to submit when the session is created.
-
#metadata ⇒ ::Hash[Symbol, String]?
Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.
-
#prompt_cache_options ⇒ OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?
Default prompt cache lifetime for turns in this session.
-
#review ⇒ OpenAI::Models::Beta::Agents::SessionCreateParams::review?
Action review mode.
-
#spend_control ⇒ OpenAI::Beta::Agents::SessionCreateParams::SpendControl?
Optional spending limit in USD cents.
-
#stream_options ⇒ OpenAI::Beta::Agents::SessionCreateParams::StreamOptions?
Options for the event stream.
-
#vault_ids ⇒ ::Array[String]?
The IDs of vaults made available to the session.
Attributes included from Internal::Type::RequestParameters
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(limit:) ⇒ SessionCreateParams
constructor
A new instance of SessionCreateParams.
- #to_hash ⇒ { environment: OpenAI::Models::Beta::environment_param, ?agent: OpenAI::Beta::Agents::SessionCreateParams::Agent, ?agent_id: String, ?input: OpenAI::Models::Beta::Agents::SessionCreateParams::input?, ?metadata: ::Hash[Symbol, String]?, ?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?, ?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review, ?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?, ?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions, ?vault_ids: ::Array[String]?, ?request_options: OpenAI::RequestOptions }
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(limit:) ⇒ SessionCreateParams
Returns a new instance of SessionCreateParams.
|
|
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 383
|
Instance Attribute Details
#agent ⇒ OpenAI::Beta::Agents::SessionCreateParams::Agent?
Agent configuration. With agent_id, supplied fields override the saved agent
for this session. Without agent_id, model is required.
25 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 25 optional :agent, -> { OpenAI::Beta::Agents::SessionCreateParams::Agent } |
#agent_id ⇒ String?
The ID of a saved reusable agent. Omit agent to use its configuration
unchanged.
32 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 32 optional :agent_id, String |
#environment ⇒ OpenAI::Models::Beta::environment_param
An inline execution environment or a reference to an environment template.
18 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 18 required :environment, union: -> { OpenAI::Beta::EnvironmentParam } |
#input ⇒ OpenAI::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.
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.
48 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 48 optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true |
#prompt_cache_options ⇒ OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?
Default prompt cache lifetime for turns in this session. Omit to use the model default.
55 56 57 58 59 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 55 optional( :prompt_cache_options, -> { OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions }, nil?: true ) |
#review ⇒ OpenAI::Models::Beta::Agents::SessionCreateParams::review?
Action review mode. Omit to use none.
65 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 65 optional :review, enum: -> { OpenAI::Beta::Agents::SessionCreateParams::Review } |
#spend_control ⇒ OpenAI::Beta::Agents::SessionCreateParams::SpendControl?
Optional spending limit in USD cents. Omission or null creates an unlimited session.
72 73 74 75 76 77 78 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 72 optional( :spend_control, -> { OpenAI::Beta::Agents::SessionCreateParams::SpendControl }, nil?: true ) |
#stream_options ⇒ OpenAI::Beta::Agents::SessionCreateParams::StreamOptions?
Options for the event stream. Only allowed when stream is true.
84 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 84 optional :stream_options, -> { OpenAI::Beta::Agents::SessionCreateParams::StreamOptions } |
#vault_ids ⇒ ::Array[String]?
The IDs of vaults made available to the session.
90 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 90 optional :vault_ids, OpenAI::Internal::Type::ArrayOf[String], nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 309
|
Instance Method Details
#to_hash ⇒ { environment: OpenAI::Models::Beta::environment_param, ?agent: OpenAI::Beta::Agents::SessionCreateParams::Agent, ?agent_id: String, ?input: OpenAI::Models::Beta::Agents::SessionCreateParams::input?, ?metadata: ::Hash[Symbol, String]?, ?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?, ?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review, ?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?, ?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions, ?vault_ids: ::Array[String]?, ?request_options: OpenAI::RequestOptions }
124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'sig/openai/models/beta/agents/session_create_params.rbs', line 124
def to_hash: -> {
environment: OpenAI::Models::Beta::environment_param,
?agent: OpenAI::Beta::Agents::SessionCreateParams::Agent,
?agent_id: String,
?input: OpenAI::Models::Beta::Agents::SessionCreateParams::input?,
?metadata: ::Hash[Symbol, String]?,
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
?vault_ids: ::Array[String]?,
?request_options: OpenAI::RequestOptions
}
|