Class: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment
- Defined in:
- lib/openai/models/beta/agents/environment_create_params.rb,
sig/openai/models/beta/agents/environment_create_params.rbs
Defined Under Namespace
Classes: Desktop, Network, Packages
Instance Attribute Summary collapse
-
#capability_directories ⇒ ::Array[String]?
Directories that contain capabilities exposed to the agent.
-
#desktop ⇒ OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?
Desktop provisioning.
-
#env ⇒ ::Hash[Symbol, String]?
Environment variables made available to the agent.
-
#environment_template_id ⇒ String?
A reusable hosted template applied before inline configuration.
-
#files ⇒ ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?
Files available before the agent starts.
-
#network ⇒ OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?
Network access policy for the environment.
-
#packages ⇒ OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?
Packages to install in the environment.
-
#plugins ⇒ ::Array[OpenAI::Beta::HostedPluginParam]?
Plugins provided as inline ZIP archives.
-
#setup_commands ⇒ ::Array[OpenAI::Beta::SetupCommandParam]?
Ordered, confidential setup commands.
-
#skills ⇒ ::Array[OpenAI::Models::Beta::hosted_skill_param]?
Skills referenced by ID or provided as inline ZIP archives.
-
#type ⇒ :openai_hosted
The type of the object.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enabled:) ⇒ Environment
constructor
A new instance of Environment.
- #to_hash ⇒ { ?type: :openai_hosted, ?capability_directories: ::Array[String]?, ?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?, ?env: ::Hash[Symbol, String]?, ?environment_template_id: String, ?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?, ?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?, ?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?, ?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?, ?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?, ?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]? }
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(enabled:) ⇒ Environment
Returns a new instance of Environment.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 40 class Environment < OpenAI::Internal::Type::BaseModel # @!attribute type # The type of the object. Always `openai_hosted`. # # @return [Symbol, :openai_hosted] required :type, const: :openai_hosted # @!attribute capability_directories # Directories that contain capabilities exposed to the agent. Defaults to an empty # list. # # @return [Array<String>, nil] optional :capability_directories, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!attribute desktop # Desktop provisioning. Omission or null inherits the template setting, or # defaults to disabled. # # @return [OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Desktop, nil] optional( :desktop, -> { OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop }, nil?: true ) # @!attribute env # Environment variables made available to the agent. # # @return [Hash{Symbol=>String}, nil] optional :env, OpenAI::Internal::Type::HashOf[String], nil?: true # @!attribute environment_template_id # A reusable hosted template applied before inline configuration. Omitted fields # inherit the template; network overrides cannot broaden its policy. # # @return [String, nil] optional :environment_template_id, String # @!attribute files # Files available before the agent starts. Defaults to an empty list. # # @return [Array<OpenAI::Models::Beta::HostedEnvironmentFileParam::FileID, OpenAI::Models::Beta::HostedEnvironmentFileParam::Inline>, nil] optional( :files, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::HostedEnvironmentFileParam] }, nil?: true ) # @!attribute network # Network access policy for the environment. If omitted, the API version # determines whether network access is enabled or disabled. # # @return [OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network, nil] optional( :network, -> { OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network }, nil?: true ) # @!attribute packages # Packages to install in the environment. Defaults to empty package lists. # # @return [OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Packages, nil] optional( :packages, -> { OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages }, nil?: true ) # @!attribute plugins # Plugins provided as inline ZIP archives. Defaults to an empty list. # # @return [Array<OpenAI::Models::Beta::HostedPluginParam>, nil] optional( :plugins, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::HostedPluginParam] }, nil?: true ) # @!attribute setup_commands # Ordered, confidential setup commands. Command bodies are never returned. # # @return [Array<OpenAI::Models::Beta::SetupCommandParam>, nil] optional( :setup_commands, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::SetupCommandParam] }, nil?: true ) # @!attribute skills # Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty # list. # # @return [Array<OpenAI::Models::Beta::HostedSkillParam::SkillReference, OpenAI::Models::Beta::HostedSkillParam::Inline>, nil] optional( :skills, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::HostedSkillParam] }, nil?: true ) # @!method initialize(capability_directories: nil, desktop: nil, env: nil, environment_template_id: nil, files: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, type: :openai_hosted) # The required hosting type and its configuration. # # @param capability_directories [Array<String>, nil] # Directories that contain capabilities exposed to the agent. Defaults to an empty # list. # # @param desktop [OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Desktop, nil] # Desktop provisioning. Omission or null inherits the template setting, or # defaults to disabled. # # @param env [Hash{Symbol=>String}, nil] # Environment variables made available to the agent. # # @param environment_template_id [String] # A reusable hosted template applied before inline configuration. Omitted fields # inherit the template; network overrides cannot broaden its policy. # # @param files [Array<OpenAI::Models::Beta::HostedEnvironmentFileParam::FileID, OpenAI::Models::Beta::HostedEnvironmentFileParam::Inline>, nil] # Files available before the agent starts. Defaults to an empty list. # # @param network [OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network, nil] # Network access policy for the environment. If omitted, the API version # determines whether network access is enabled or disabled. # # @param packages [OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Packages, nil] # Packages to install in the environment. Defaults to empty package lists. # # @param plugins [Array<OpenAI::Models::Beta::HostedPluginParam>, nil] # Plugins provided as inline ZIP archives. Defaults to an empty list. # # @param setup_commands [Array<OpenAI::Models::Beta::SetupCommandParam>, nil] # Ordered, confidential setup commands. Command bodies are never returned. # # @param skills [Array<OpenAI::Models::Beta::HostedSkillParam::SkillReference, OpenAI::Models::Beta::HostedSkillParam::Inline>, nil] # Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty # list. # # @param type [Symbol, :openai_hosted] # The type of the object. Always `openai_hosted`. # @see OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment#desktop class Desktop < OpenAI::Internal::Type::BaseModel # @!attribute enabled # Whether to provision the desktop and its browser proxy. # # @return [Boolean] required :enabled, OpenAI::Internal::Type::Boolean # @!method initialize(enabled:) # Desktop provisioning. Omission or null inherits the template setting, or # defaults to disabled. # # @param enabled [Boolean] # Whether to provision the desktop and its browser proxy. end # @see OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment#network class Network < OpenAI::Internal::Type::BaseModel # @!attribute access # The environment's network access mode. # # @return [Symbol, OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::Access] required( :access, enum: -> { OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network::Access } ) # @!attribute allowed_domains # Domains the environment may access when network access is restricted. # # @return [Array<String>, nil] optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!attribute blocked_domains # Domains blocked for both executor and browser when access is restricted. A # nonempty list requires `access: restricted` and cannot be combined with nonempty # `allowed_domains`. Wildcard domains are not supported. # # @return [Array<String>, nil] optional :blocked_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(access:, allowed_domains: nil, blocked_domains: nil) # Network access policy for the environment. If omitted, the API version # determines whether network access is enabled or disabled. # # @param access [Symbol, OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::Access] # The environment's network access mode. # # @param allowed_domains [Array<String>, nil] # Domains the environment may access when network access is restricted. # # @param blocked_domains [Array<String>, nil] # Domains blocked for both executor and browser when access is restricted. A # nonempty list requires `access: restricted` and cannot be combined with nonempty # `allowed_domains`. Wildcard domains are not supported. # The environment's network access mode. # # @see OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network#access module Access extend OpenAI::Internal::Type::Enum # Allows unrestricted network access. ENABLED = :enabled # Disables network access. DISABLED = :disabled # Applies the configured domain restrictions. RESTRICTED = :restricted # @!method self.values # @return [Array<Symbol>] end end # @see OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment#packages class Packages < OpenAI::Internal::Type::BaseModel # @!attribute npm # npm packages to install globally. Defaults to an empty list. # # @return [Array<String>, nil] optional :npm, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!attribute python # Python packages to install. Defaults to an empty list. # # @return [Array<String>, nil] optional :python, OpenAI::Internal::Type::ArrayOf[String], nil?: true # @!attribute system_ # System packages to install. Defaults to an empty list. # # @return [Array<String>, nil] optional :system_, OpenAI::Internal::Type::ArrayOf[String], api_name: :system, nil?: true # @!method initialize(npm: nil, python: nil, system_: nil) # Packages to install in the environment. Defaults to empty package lists. # # @param npm [Array<String>, nil] # npm packages to install globally. Defaults to an empty list. # # @param python [Array<String>, nil] # Python packages to install. Defaults to an empty list. # # @param system_ [Array<String>, nil] # System packages to install. Defaults to an empty list. end end |
Instance Attribute Details
#capability_directories ⇒ ::Array[String]?
Directories that contain capabilities exposed to the agent. Defaults to an empty list.
52 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 52 optional :capability_directories, OpenAI::Internal::Type::ArrayOf[String], nil?: true |
#desktop ⇒ OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?
Desktop provisioning. Omission or null inherits the template setting, or defaults to disabled.
59 60 61 62 63 64 65 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 59 optional( :desktop, -> { OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop }, nil?: true ) |
#env ⇒ ::Hash[Symbol, String]?
Environment variables made available to the agent.
71 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 71 optional :env, OpenAI::Internal::Type::HashOf[String], nil?: true |
#environment_template_id ⇒ String?
A reusable hosted template applied before inline configuration. Omitted fields inherit the template; network overrides cannot broaden its policy.
78 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 78 optional :environment_template_id, String |
#files ⇒ ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?
Files available before the agent starts. Defaults to an empty list.
84 85 86 87 88 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 84 optional( :files, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::HostedEnvironmentFileParam] }, nil?: true ) |
#network ⇒ OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?
Network access policy for the environment. If omitted, the API version determines whether network access is enabled or disabled.
95 96 97 98 99 100 101 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 95 optional( :network, -> { OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network }, nil?: true ) |
#packages ⇒ OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?
Packages to install in the environment. Defaults to empty package lists.
107 108 109 110 111 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 107 optional( :packages, -> { OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages }, nil?: true ) |
#plugins ⇒ ::Array[OpenAI::Beta::HostedPluginParam]?
Plugins provided as inline ZIP archives. Defaults to an empty list.
117 118 119 120 121 122 123 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 117 optional( :plugins, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::HostedPluginParam] }, nil?: true ) |
#setup_commands ⇒ ::Array[OpenAI::Beta::SetupCommandParam]?
Ordered, confidential setup commands. Command bodies are never returned.
129 130 131 132 133 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 129 optional( :setup_commands, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::SetupCommandParam] }, nil?: true ) |
#skills ⇒ ::Array[OpenAI::Models::Beta::hosted_skill_param]?
Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty list.
140 141 142 143 144 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 140 optional( :skills, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::HostedSkillParam] }, nil?: true ) |
#type ⇒ :openai_hosted
The type of the object. Always openai_hosted.
45 |
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 45 required :type, const: :openai_hosted |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/agents/environment_create_params.rb', line 258
|
Instance Method Details
#to_hash ⇒ { ?type: :openai_hosted, ?capability_directories: ::Array[String]?, ?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?, ?env: ::Hash[Symbol, String]?, ?environment_template_id: String, ?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?, ?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?, ?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?, ?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?, ?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?, ?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]? }
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'sig/openai/models/beta/agents/environment_create_params.rbs', line 144
def to_hash: -> {
?type: :openai_hosted,
?capability_directories: ::Array[String]?,
?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?,
?env: ::Hash[Symbol, String]?,
?environment_template_id: String,
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?,
?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?,
?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?,
?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?,
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
}
|