openai 0.101.1 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agents/environment_create_params.rb +300 -0
- data/lib/openai/models/beta/agents/environment_info.rb +4 -1
- data/lib/openai/models/beta/agents/environment_list_params.rb +78 -0
- data/lib/openai/models/beta/environment_param.rb +12 -1
- data/lib/openai/models/webhooks/agent_environment_failed_webhook_event.rb +73 -0
- data/lib/openai/models/webhooks/agent_environment_ready_webhook_event.rb +73 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +9 -3
- data/lib/openai/models/webhooks/webhook_create_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +2 -0
- data/lib/openai/resources/beta/agents/environments/files.rb +4 -2
- data/lib/openai/resources/beta/agents/environments/templates.rb +10 -5
- data/lib/openai/resources/beta/agents/environments.rb +80 -1
- data/lib/openai/resources/beta/agents/sessions/artifacts.rb +8 -5
- data/lib/openai/resources/beta/agents/sessions/events.rb +10 -4
- data/lib/openai/resources/beta/agents/sessions/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/turns/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/turns.rb +4 -2
- data/lib/openai/resources/beta/agents/sessions/subagents.rb +4 -2
- data/lib/openai/resources/beta/agents/sessions/traces.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/turns/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -2
- data/lib/openai/resources/beta/agents/sessions.rb +16 -7
- data/lib/openai/resources/beta/agents/vaults/credentials.rb +10 -5
- data/lib/openai/resources/beta/agents/vaults.rb +8 -4
- data/lib/openai/resources/beta/agents.rb +10 -5
- data/lib/openai/resources/beta/assistants.rb +10 -5
- data/lib/openai/resources/beta/chatkit/sessions.rb +4 -2
- data/lib/openai/resources/beta/chatkit/threads.rb +8 -4
- data/lib/openai/resources/beta/threads/messages.rb +10 -5
- data/lib/openai/resources/beta/threads/runs/steps.rb +4 -2
- data/lib/openai/resources/beta/threads/runs.rb +24 -10
- data/lib/openai/resources/beta/threads.rb +16 -7
- data/lib/openai/resources/vector_stores/file_batches.rb +8 -10
- data/lib/openai/resources/vector_stores/files.rb +12 -12
- data/lib/openai/resources/vector_stores.rb +12 -6
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -0
- data/rbi/openai/models/beta/agents/environment_create_params.rbi +499 -0
- data/rbi/openai/models/beta/agents/environment_info.rbi +3 -0
- data/rbi/openai/models/beta/agents/environment_list_params.rbi +136 -0
- data/rbi/openai/models/beta/environment_param.rbi +15 -0
- data/rbi/openai/models/webhooks/agent_environment_failed_webhook_event.rbi +134 -0
- data/rbi/openai/models/webhooks/agent_environment_ready_webhook_event.rbi +134 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +4 -2
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +8 -0
- data/rbi/openai/resources/beta/agents/environments.rbi +53 -0
- data/rbi/openai/resources/webhooks.rbi +2 -0
- data/sig/openai/models/beta/agents/environment_create_params.rbs +268 -0
- data/sig/openai/models/beta/agents/environment_info.rbs +5 -1
- data/sig/openai/models/beta/agents/environment_list_params.rbs +97 -0
- data/sig/openai/models/beta/environment_param.rbs +14 -0
- data/sig/openai/models/webhooks/agent_environment_failed_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/agent_environment_ready_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +3 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +4 -0
- data/sig/openai/resources/beta/agents/environments.rbs +15 -0
- data/sig/openai/resources/webhooks.rbs +3 -1
- metadata +13 -1
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type environment_create_params =
|
|
6
|
+
{
|
|
7
|
+
environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment,
|
|
8
|
+
?vault_ids: ::Array[String]?,
|
|
9
|
+
?idempotency_key: String,
|
|
10
|
+
?request_options: OpenAI::request_opts
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class EnvironmentCreateParams < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
# The required hosting type and its configuration.
|
|
18
|
+
attr_accessor environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment
|
|
19
|
+
|
|
20
|
+
# The IDs of up to 10 vaults made available to an OpenAI-hosted environment.
|
|
21
|
+
attr_accessor vault_ids: ::Array[String]?
|
|
22
|
+
|
|
23
|
+
attr_reader idempotency_key: String?
|
|
24
|
+
|
|
25
|
+
def idempotency_key=: (String) -> String
|
|
26
|
+
|
|
27
|
+
# @param environment
|
|
28
|
+
# The required hosting type and its configuration.
|
|
29
|
+
# @param vault_ids
|
|
30
|
+
# The IDs of up to 10 vaults made available to an OpenAI-hosted environment.
|
|
31
|
+
def initialize: (
|
|
32
|
+
environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment,
|
|
33
|
+
?vault_ids: ::Array[String]?,
|
|
34
|
+
?idempotency_key: String,
|
|
35
|
+
?request_options: OpenAI::request_opts
|
|
36
|
+
) -> void
|
|
37
|
+
|
|
38
|
+
def to_hash: -> {
|
|
39
|
+
environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment,
|
|
40
|
+
?vault_ids: ::Array[String]?,
|
|
41
|
+
?idempotency_key: String,
|
|
42
|
+
?request_options: OpenAI::RequestOptions
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type environment =
|
|
46
|
+
{
|
|
47
|
+
?type: :openai_hosted,
|
|
48
|
+
?capability_directories: ::Array[String]?,
|
|
49
|
+
?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?,
|
|
50
|
+
?env: ::Hash[Symbol, String]?,
|
|
51
|
+
?environment_template_id: String,
|
|
52
|
+
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
53
|
+
?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?,
|
|
54
|
+
?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?,
|
|
55
|
+
?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?,
|
|
56
|
+
?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?,
|
|
57
|
+
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
class Environment < OpenAI::Internal::Type::BaseModel
|
|
61
|
+
# The type of the object. Always `openai_hosted`.
|
|
62
|
+
attr_accessor type: :openai_hosted
|
|
63
|
+
|
|
64
|
+
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
65
|
+
# list.
|
|
66
|
+
attr_accessor capability_directories: ::Array[String]?
|
|
67
|
+
|
|
68
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
69
|
+
# defaults to disabled.
|
|
70
|
+
attr_accessor desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?
|
|
71
|
+
|
|
72
|
+
# Environment variables made available to the agent.
|
|
73
|
+
attr_accessor env: ::Hash[Symbol, String]?
|
|
74
|
+
|
|
75
|
+
# A reusable hosted template applied before inline configuration. Omitted fields
|
|
76
|
+
# inherit the template; network overrides cannot broaden its policy.
|
|
77
|
+
attr_reader environment_template_id: String?
|
|
78
|
+
|
|
79
|
+
# A reusable hosted template applied before inline configuration. Omitted fields
|
|
80
|
+
# inherit the template; network overrides cannot broaden its policy.
|
|
81
|
+
def environment_template_id=: (String) -> String
|
|
82
|
+
|
|
83
|
+
# Files available before the agent starts. Defaults to an empty list.
|
|
84
|
+
attr_accessor files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?
|
|
85
|
+
|
|
86
|
+
# Network access policy for the environment. If omitted, the API version
|
|
87
|
+
# determines whether network access is enabled or disabled.
|
|
88
|
+
attr_accessor network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?
|
|
89
|
+
|
|
90
|
+
# Packages to install in the environment. Defaults to empty package lists.
|
|
91
|
+
attr_accessor packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?
|
|
92
|
+
|
|
93
|
+
# Plugins provided as inline ZIP archives. Defaults to an empty list.
|
|
94
|
+
attr_accessor plugins: ::Array[OpenAI::Beta::HostedPluginParam]?
|
|
95
|
+
|
|
96
|
+
# Ordered, confidential setup commands. Command bodies are never returned.
|
|
97
|
+
attr_accessor setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?
|
|
98
|
+
|
|
99
|
+
# Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty
|
|
100
|
+
# list.
|
|
101
|
+
attr_accessor skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
|
|
102
|
+
|
|
103
|
+
# @param capability_directories
|
|
104
|
+
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
105
|
+
# list.
|
|
106
|
+
# @param desktop
|
|
107
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
108
|
+
# defaults to disabled.
|
|
109
|
+
# @param env
|
|
110
|
+
# Environment variables made available to the agent.
|
|
111
|
+
# @param environment_template_id
|
|
112
|
+
# A reusable hosted template applied before inline configuration. Omitted fields
|
|
113
|
+
# inherit the template; network overrides cannot broaden its policy.
|
|
114
|
+
# @param files
|
|
115
|
+
# Files available before the agent starts. Defaults to an empty list.
|
|
116
|
+
# @param network
|
|
117
|
+
# Network access policy for the environment. If omitted, the API version
|
|
118
|
+
# determines whether network access is enabled or disabled.
|
|
119
|
+
# @param packages
|
|
120
|
+
# Packages to install in the environment. Defaults to empty package lists.
|
|
121
|
+
# @param plugins
|
|
122
|
+
# Plugins provided as inline ZIP archives. Defaults to an empty list.
|
|
123
|
+
# @param setup_commands
|
|
124
|
+
# Ordered, confidential setup commands. Command bodies are never returned.
|
|
125
|
+
# @param skills
|
|
126
|
+
# Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty
|
|
127
|
+
# list.
|
|
128
|
+
# @param type
|
|
129
|
+
# The type of the object. Always `openai_hosted`.
|
|
130
|
+
def initialize: (
|
|
131
|
+
?capability_directories: ::Array[String]?,
|
|
132
|
+
?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?,
|
|
133
|
+
?env: ::Hash[Symbol, String]?,
|
|
134
|
+
?environment_template_id: String,
|
|
135
|
+
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
136
|
+
?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?,
|
|
137
|
+
?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?,
|
|
138
|
+
?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?,
|
|
139
|
+
?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?,
|
|
140
|
+
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?,
|
|
141
|
+
?type: :openai_hosted
|
|
142
|
+
) -> void
|
|
143
|
+
|
|
144
|
+
def to_hash: -> {
|
|
145
|
+
?type: :openai_hosted,
|
|
146
|
+
?capability_directories: ::Array[String]?,
|
|
147
|
+
?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?,
|
|
148
|
+
?env: ::Hash[Symbol, String]?,
|
|
149
|
+
?environment_template_id: String,
|
|
150
|
+
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
151
|
+
?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?,
|
|
152
|
+
?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?,
|
|
153
|
+
?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?,
|
|
154
|
+
?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?,
|
|
155
|
+
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
type desktop = { enabled: bool }
|
|
159
|
+
|
|
160
|
+
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
161
|
+
# Whether to provision the desktop and its browser proxy.
|
|
162
|
+
attr_accessor enabled: bool
|
|
163
|
+
|
|
164
|
+
# @param enabled
|
|
165
|
+
# Whether to provision the desktop and its browser proxy.
|
|
166
|
+
def initialize: (enabled: bool) -> void
|
|
167
|
+
|
|
168
|
+
def to_hash: -> { enabled: bool }
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
type network =
|
|
172
|
+
{
|
|
173
|
+
access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access,
|
|
174
|
+
?allowed_domains: ::Array[String]?,
|
|
175
|
+
?blocked_domains: ::Array[String]?
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
class Network < OpenAI::Internal::Type::BaseModel
|
|
179
|
+
# The environment's network access mode.
|
|
180
|
+
attr_accessor access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access
|
|
181
|
+
|
|
182
|
+
# Domains the environment may access when network access is restricted.
|
|
183
|
+
attr_accessor allowed_domains: ::Array[String]?
|
|
184
|
+
|
|
185
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
186
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
187
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
188
|
+
attr_accessor blocked_domains: ::Array[String]?
|
|
189
|
+
|
|
190
|
+
# @param access
|
|
191
|
+
# The environment's network access mode.
|
|
192
|
+
# @param allowed_domains
|
|
193
|
+
# Domains the environment may access when network access is restricted.
|
|
194
|
+
# @param blocked_domains
|
|
195
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
196
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
197
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
198
|
+
def initialize: (
|
|
199
|
+
access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access,
|
|
200
|
+
?allowed_domains: ::Array[String]?,
|
|
201
|
+
?blocked_domains: ::Array[String]?
|
|
202
|
+
) -> void
|
|
203
|
+
|
|
204
|
+
def to_hash: -> {
|
|
205
|
+
access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access,
|
|
206
|
+
?allowed_domains: ::Array[String]?,
|
|
207
|
+
?blocked_domains: ::Array[String]?
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
type access = :enabled | :disabled | :restricted
|
|
211
|
+
|
|
212
|
+
module Access
|
|
213
|
+
extend OpenAI::Internal::Type::Enum
|
|
214
|
+
|
|
215
|
+
# Allows unrestricted network access.
|
|
216
|
+
ENABLED: :enabled
|
|
217
|
+
|
|
218
|
+
# Disables network access.
|
|
219
|
+
DISABLED: :disabled
|
|
220
|
+
|
|
221
|
+
# Applies the configured domain restrictions.
|
|
222
|
+
RESTRICTED: :restricted
|
|
223
|
+
|
|
224
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access]
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
type packages =
|
|
229
|
+
{
|
|
230
|
+
?npm: ::Array[String]?,
|
|
231
|
+
?python: ::Array[String]?,
|
|
232
|
+
?system_: ::Array[String]?
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
class Packages < OpenAI::Internal::Type::BaseModel
|
|
236
|
+
# npm packages to install globally. Defaults to an empty list.
|
|
237
|
+
attr_accessor npm: ::Array[String]?
|
|
238
|
+
|
|
239
|
+
# Python packages to install. Defaults to an empty list.
|
|
240
|
+
attr_accessor python: ::Array[String]?
|
|
241
|
+
|
|
242
|
+
# System packages to install. Defaults to an empty list.
|
|
243
|
+
attr_accessor system_: ::Array[String]?
|
|
244
|
+
|
|
245
|
+
# @param npm
|
|
246
|
+
# npm packages to install globally. Defaults to an empty list.
|
|
247
|
+
# @param python
|
|
248
|
+
# Python packages to install. Defaults to an empty list.
|
|
249
|
+
# @param system_
|
|
250
|
+
# System packages to install. Defaults to an empty list.
|
|
251
|
+
def initialize: (
|
|
252
|
+
?npm: ::Array[String]?,
|
|
253
|
+
?python: ::Array[String]?,
|
|
254
|
+
?system_: ::Array[String]?
|
|
255
|
+
) -> void
|
|
256
|
+
|
|
257
|
+
def to_hash: -> {
|
|
258
|
+
?npm: ::Array[String]?,
|
|
259
|
+
?python: ::Array[String]?,
|
|
260
|
+
?system_: ::Array[String]?
|
|
261
|
+
}
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
end
|
|
@@ -70,12 +70,16 @@ module OpenAI
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
type status =
|
|
73
|
-
:pending | :connected | :disconnected | :expired | :failed
|
|
73
|
+
:pending | :ready | :connected | :disconnected | :expired | :failed
|
|
74
74
|
|
|
75
75
|
module Status
|
|
76
76
|
extend OpenAI::Internal::Type::Enum
|
|
77
77
|
|
|
78
78
|
PENDING: :pending
|
|
79
|
+
|
|
80
|
+
# Provisioning succeeded and the environment is available for attachment or use.
|
|
81
|
+
READY: :ready
|
|
82
|
+
|
|
79
83
|
CONNECTED: :connected
|
|
80
84
|
DISCONNECTED: :disconnected
|
|
81
85
|
EXPIRED: :expired
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type environment_list_params =
|
|
6
|
+
{
|
|
7
|
+
?after: String,
|
|
8
|
+
?limit: Integer,
|
|
9
|
+
?order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order,
|
|
10
|
+
?type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_,
|
|
11
|
+
?request_options: OpenAI::request_opts
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class EnvironmentListParams < OpenAI::Internal::Type::BaseModel
|
|
15
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
16
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
17
|
+
|
|
18
|
+
# Return environments after this environment ID in the selected order.
|
|
19
|
+
attr_reader after: String?
|
|
20
|
+
|
|
21
|
+
# Return environments after this environment ID in the selected order.
|
|
22
|
+
def after=: (String) -> String
|
|
23
|
+
|
|
24
|
+
# The maximum number of environments to return, between 1 and 100. Defaults to 20.
|
|
25
|
+
attr_reader limit: Integer?
|
|
26
|
+
|
|
27
|
+
# The maximum number of environments to return, between 1 and 100. Defaults to 20.
|
|
28
|
+
def limit=: (Integer) -> Integer
|
|
29
|
+
|
|
30
|
+
# The order in which environments are returned. Defaults to `desc`.
|
|
31
|
+
attr_reader order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order?
|
|
32
|
+
|
|
33
|
+
# The order in which environments are returned. Defaults to `desc`.
|
|
34
|
+
def order=: (
|
|
35
|
+
OpenAI::Models::Beta::Agents::EnvironmentListParams::order
|
|
36
|
+
) -> OpenAI::Models::Beta::Agents::EnvironmentListParams::order
|
|
37
|
+
|
|
38
|
+
# The hosting type to list. Defaults to `openai_hosted`.
|
|
39
|
+
attr_reader type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_?
|
|
40
|
+
|
|
41
|
+
# The hosting type to list. Defaults to `openai_hosted`.
|
|
42
|
+
def type=: (
|
|
43
|
+
OpenAI::Models::Beta::Agents::EnvironmentListParams::type_
|
|
44
|
+
) -> OpenAI::Models::Beta::Agents::EnvironmentListParams::type_
|
|
45
|
+
|
|
46
|
+
# @param after
|
|
47
|
+
# Return environments after this environment ID in the selected order.
|
|
48
|
+
# @param limit
|
|
49
|
+
# The maximum number of environments to return, between 1 and 100. Defaults to 20.
|
|
50
|
+
# @param order
|
|
51
|
+
# The order in which environments are returned. Defaults to `desc`.
|
|
52
|
+
# @param type
|
|
53
|
+
# The hosting type to list. Defaults to `openai_hosted`.
|
|
54
|
+
def initialize: (
|
|
55
|
+
?after: String,
|
|
56
|
+
?limit: Integer,
|
|
57
|
+
?order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order,
|
|
58
|
+
?type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_,
|
|
59
|
+
?request_options: OpenAI::request_opts
|
|
60
|
+
) -> void
|
|
61
|
+
|
|
62
|
+
def to_hash: -> {
|
|
63
|
+
?after: String,
|
|
64
|
+
?limit: Integer,
|
|
65
|
+
?order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order,
|
|
66
|
+
?type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_,
|
|
67
|
+
?request_options: OpenAI::RequestOptions
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type order = :asc | :desc
|
|
71
|
+
|
|
72
|
+
module Order
|
|
73
|
+
extend OpenAI::Internal::Type::Enum
|
|
74
|
+
|
|
75
|
+
# Returns resources in ascending order.
|
|
76
|
+
ASC: :asc
|
|
77
|
+
|
|
78
|
+
# Returns resources in descending order.
|
|
79
|
+
DESC: :desc
|
|
80
|
+
|
|
81
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::EnvironmentListParams::order]
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
type type_ = :openai_hosted
|
|
85
|
+
|
|
86
|
+
module Type
|
|
87
|
+
extend OpenAI::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
OPENAI_HOSTED: :openai_hosted
|
|
90
|
+
|
|
91
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::EnvironmentListParams::type_]
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -29,6 +29,7 @@ module OpenAI
|
|
|
29
29
|
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
30
30
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
31
31
|
?env: ::Hash[Symbol, String]?,
|
|
32
|
+
?environment_id: String,
|
|
32
33
|
?environment_template_id: String,
|
|
33
34
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
34
35
|
?network: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network?,
|
|
@@ -61,6 +62,14 @@ module OpenAI
|
|
|
61
62
|
# Environment variables made available to the agent.
|
|
62
63
|
attr_accessor env: ::Hash[Symbol, String]?
|
|
63
64
|
|
|
65
|
+
# An existing prewarmed environment. Cannot be combined with a template or inline
|
|
66
|
+
# configuration.
|
|
67
|
+
attr_reader environment_id: String?
|
|
68
|
+
|
|
69
|
+
# An existing prewarmed environment. Cannot be combined with a template or inline
|
|
70
|
+
# configuration.
|
|
71
|
+
def environment_id=: (String) -> String
|
|
72
|
+
|
|
64
73
|
# A reusable hosted template applied before inline session configuration. Omitted
|
|
65
74
|
# fields inherit the template; network overrides cannot broaden its policy.
|
|
66
75
|
attr_reader environment_template_id: String?
|
|
@@ -99,6 +108,9 @@ module OpenAI
|
|
|
99
108
|
# defaults to disabled.
|
|
100
109
|
# @param env
|
|
101
110
|
# Environment variables made available to the agent.
|
|
111
|
+
# @param environment_id
|
|
112
|
+
# An existing prewarmed environment. Cannot be combined with a template or inline
|
|
113
|
+
# configuration.
|
|
102
114
|
# @param environment_template_id
|
|
103
115
|
# A reusable hosted template applied before inline session configuration. Omitted
|
|
104
116
|
# fields inherit the template; network overrides cannot broaden its policy.
|
|
@@ -123,6 +135,7 @@ module OpenAI
|
|
|
123
135
|
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
124
136
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
125
137
|
?env: ::Hash[Symbol, String]?,
|
|
138
|
+
?environment_id: String,
|
|
126
139
|
?environment_template_id: String,
|
|
127
140
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
128
141
|
?network: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network?,
|
|
@@ -139,6 +152,7 @@ module OpenAI
|
|
|
139
152
|
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
140
153
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
141
154
|
?env: ::Hash[Symbol, String]?,
|
|
155
|
+
?environment_id: String,
|
|
142
156
|
?environment_template_id: String,
|
|
143
157
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
144
158
|
?network: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network?,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Webhooks
|
|
4
|
+
type agent_environment_failed_webhook_event =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
created_at: Integer,
|
|
8
|
+
data: OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent::Data,
|
|
9
|
+
?object: :event,
|
|
10
|
+
?type: :"agent.environment.failed"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class AgentEnvironmentFailedWebhookEvent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The unique ID of the event.
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
18
|
+
attr_accessor created_at: Integer
|
|
19
|
+
|
|
20
|
+
# Identifies the environment whose lifecycle changed.
|
|
21
|
+
attr_accessor data: OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent::Data
|
|
22
|
+
|
|
23
|
+
# The object type. Always `event`.
|
|
24
|
+
attr_accessor object: :event
|
|
25
|
+
|
|
26
|
+
# The event type. Always `agent.environment.failed`.
|
|
27
|
+
attr_accessor type: :"agent.environment.failed"
|
|
28
|
+
|
|
29
|
+
# @param id
|
|
30
|
+
# The unique ID of the event.
|
|
31
|
+
# @param created_at
|
|
32
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
33
|
+
# @param data
|
|
34
|
+
# Identifies the environment whose lifecycle changed.
|
|
35
|
+
# @param object
|
|
36
|
+
# The object type. Always `event`.
|
|
37
|
+
# @param type
|
|
38
|
+
# The event type. Always `agent.environment.failed`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
id: String,
|
|
41
|
+
created_at: Integer,
|
|
42
|
+
data: OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent::Data,
|
|
43
|
+
?object: :event,
|
|
44
|
+
?type: :"agent.environment.failed"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
id: String,
|
|
49
|
+
created_at: Integer,
|
|
50
|
+
data: OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent::Data,
|
|
51
|
+
?object: :event,
|
|
52
|
+
?type: :"agent.environment.failed"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type data = { id: String }
|
|
56
|
+
|
|
57
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
|
58
|
+
# The ID of the environment.
|
|
59
|
+
attr_accessor id: String
|
|
60
|
+
|
|
61
|
+
# @param id
|
|
62
|
+
# The ID of the environment.
|
|
63
|
+
def initialize: (id: String) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> { id: String }
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Webhooks
|
|
4
|
+
type agent_environment_ready_webhook_event =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
created_at: Integer,
|
|
8
|
+
data: OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent::Data,
|
|
9
|
+
?object: :event,
|
|
10
|
+
?type: :"agent.environment.ready"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class AgentEnvironmentReadyWebhookEvent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The unique ID of the event.
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
18
|
+
attr_accessor created_at: Integer
|
|
19
|
+
|
|
20
|
+
# Identifies the environment whose lifecycle changed.
|
|
21
|
+
attr_accessor data: OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent::Data
|
|
22
|
+
|
|
23
|
+
# The object type. Always `event`.
|
|
24
|
+
attr_accessor object: :event
|
|
25
|
+
|
|
26
|
+
# The event type. Always `agent.environment.ready`.
|
|
27
|
+
attr_accessor type: :"agent.environment.ready"
|
|
28
|
+
|
|
29
|
+
# @param id
|
|
30
|
+
# The unique ID of the event.
|
|
31
|
+
# @param created_at
|
|
32
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
33
|
+
# @param data
|
|
34
|
+
# Identifies the environment whose lifecycle changed.
|
|
35
|
+
# @param object
|
|
36
|
+
# The object type. Always `event`.
|
|
37
|
+
# @param type
|
|
38
|
+
# The event type. Always `agent.environment.ready`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
id: String,
|
|
41
|
+
created_at: Integer,
|
|
42
|
+
data: OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent::Data,
|
|
43
|
+
?object: :event,
|
|
44
|
+
?type: :"agent.environment.ready"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
id: String,
|
|
49
|
+
created_at: Integer,
|
|
50
|
+
data: OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent::Data,
|
|
51
|
+
?object: :event,
|
|
52
|
+
?type: :"agent.environment.ready"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type data = { id: String }
|
|
56
|
+
|
|
57
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
|
58
|
+
# The ID of the environment.
|
|
59
|
+
attr_accessor id: String
|
|
60
|
+
|
|
61
|
+
# @param id
|
|
62
|
+
# The ID of the environment.
|
|
63
|
+
def initialize: (id: String) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> { id: String }
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -2,7 +2,9 @@ module OpenAI
|
|
|
2
2
|
module Models
|
|
3
3
|
module Webhooks
|
|
4
4
|
type unwrap_webhook_event =
|
|
5
|
-
OpenAI::Webhooks::
|
|
5
|
+
OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent
|
|
6
|
+
| OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent
|
|
7
|
+
| OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent
|
|
6
8
|
| OpenAI::Webhooks::AgentSessionCreatedWebhookEvent
|
|
7
9
|
| OpenAI::Webhooks::AgentSessionFailedWebhookEvent
|
|
8
10
|
| OpenAI::Webhooks::AgentSessionIdleWebhookEvent
|
|
@@ -60,6 +60,8 @@ module OpenAI
|
|
|
60
60
|
| :"realtime.call.incoming"
|
|
61
61
|
| :"video.completed"
|
|
62
62
|
| :"video.failed"
|
|
63
|
+
| :"agent.environment.ready"
|
|
64
|
+
| :"agent.environment.failed"
|
|
63
65
|
| :"agent.session.created"
|
|
64
66
|
| :"agent.session.action_required"
|
|
65
67
|
| :"agent.session.in_progress"
|
|
@@ -87,6 +89,8 @@ module OpenAI
|
|
|
87
89
|
REALTIME_CALL_INCOMING: :"realtime.call.incoming"
|
|
88
90
|
VIDEO_COMPLETED: :"video.completed"
|
|
89
91
|
VIDEO_FAILED: :"video.failed"
|
|
92
|
+
AGENT_ENVIRONMENT_READY: :"agent.environment.ready"
|
|
93
|
+
AGENT_ENVIRONMENT_FAILED: :"agent.environment.failed"
|
|
90
94
|
AGENT_SESSION_CREATED: :"agent.session.created"
|
|
91
95
|
AGENT_SESSION_ACTION_REQUIRED: :"agent.session.action_required"
|
|
92
96
|
AGENT_SESSION_IN_PROGRESS: :"agent.session.in_progress"
|
|
@@ -49,6 +49,8 @@ module OpenAI
|
|
|
49
49
|
| :"realtime.call.incoming"
|
|
50
50
|
| :"video.completed"
|
|
51
51
|
| :"video.failed"
|
|
52
|
+
| :"agent.environment.ready"
|
|
53
|
+
| :"agent.environment.failed"
|
|
52
54
|
| :"agent.session.created"
|
|
53
55
|
| :"agent.session.action_required"
|
|
54
56
|
| :"agent.session.in_progress"
|
|
@@ -76,6 +78,8 @@ module OpenAI
|
|
|
76
78
|
REALTIME_CALL_INCOMING: :"realtime.call.incoming"
|
|
77
79
|
VIDEO_COMPLETED: :"video.completed"
|
|
78
80
|
VIDEO_FAILED: :"video.failed"
|
|
81
|
+
AGENT_ENVIRONMENT_READY: :"agent.environment.ready"
|
|
82
|
+
AGENT_ENVIRONMENT_FAILED: :"agent.environment.failed"
|
|
79
83
|
AGENT_SESSION_CREATED: :"agent.session.created"
|
|
80
84
|
AGENT_SESSION_ACTION_REQUIRED: :"agent.session.action_required"
|
|
81
85
|
AGENT_SESSION_IN_PROGRESS: :"agent.session.in_progress"
|
|
@@ -76,6 +76,8 @@ module OpenAI
|
|
|
76
76
|
| :"realtime.call.incoming"
|
|
77
77
|
| :"video.completed"
|
|
78
78
|
| :"video.failed"
|
|
79
|
+
| :"agent.environment.ready"
|
|
80
|
+
| :"agent.environment.failed"
|
|
79
81
|
| :"agent.session.created"
|
|
80
82
|
| :"agent.session.action_required"
|
|
81
83
|
| :"agent.session.in_progress"
|
|
@@ -103,6 +105,8 @@ module OpenAI
|
|
|
103
105
|
REALTIME_CALL_INCOMING: :"realtime.call.incoming"
|
|
104
106
|
VIDEO_COMPLETED: :"video.completed"
|
|
105
107
|
VIDEO_FAILED: :"video.failed"
|
|
108
|
+
AGENT_ENVIRONMENT_READY: :"agent.environment.ready"
|
|
109
|
+
AGENT_ENVIRONMENT_FAILED: :"agent.environment.failed"
|
|
106
110
|
AGENT_SESSION_CREATED: :"agent.session.created"
|
|
107
111
|
AGENT_SESSION_ACTION_REQUIRED: :"agent.session.action_required"
|
|
108
112
|
AGENT_SESSION_IN_PROGRESS: :"agent.session.in_progress"
|
|
@@ -7,11 +7,26 @@ module OpenAI
|
|
|
7
7
|
|
|
8
8
|
attr_reader templates: OpenAI::Resources::Beta::Agents::Environments::Templates
|
|
9
9
|
|
|
10
|
+
def create: (
|
|
11
|
+
environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment,
|
|
12
|
+
?vault_ids: ::Array[String]?,
|
|
13
|
+
?idempotency_key: String,
|
|
14
|
+
?request_options: OpenAI::request_opts
|
|
15
|
+
) -> OpenAI::Beta::Agents::EnvironmentInfo
|
|
16
|
+
|
|
10
17
|
def retrieve: (
|
|
11
18
|
String environment_id,
|
|
12
19
|
?request_options: OpenAI::request_opts
|
|
13
20
|
) -> OpenAI::Beta::Agents::EnvironmentInfo
|
|
14
21
|
|
|
22
|
+
def list: (
|
|
23
|
+
?after: String,
|
|
24
|
+
?limit: Integer,
|
|
25
|
+
?order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order,
|
|
26
|
+
?type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_,
|
|
27
|
+
?request_options: OpenAI::request_opts
|
|
28
|
+
) -> OpenAI::Internal::CursorPage[OpenAI::Beta::Agents::EnvironmentInfo]
|
|
29
|
+
|
|
15
30
|
def initialize: (client: OpenAI::Client) -> void
|
|
16
31
|
end
|
|
17
32
|
end
|
|
@@ -50,7 +50,9 @@ module OpenAI
|
|
|
50
50
|
String payload,
|
|
51
51
|
?Hash[String | Symbol, String] headers,
|
|
52
52
|
?String? webhook_secret
|
|
53
|
-
) -> (OpenAI::Webhooks::
|
|
53
|
+
) -> (OpenAI::Webhooks::AgentEnvironmentFailedWebhookEvent
|
|
54
|
+
| OpenAI::Webhooks::AgentEnvironmentReadyWebhookEvent
|
|
55
|
+
| OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent
|
|
54
56
|
| OpenAI::Webhooks::AgentSessionCreatedWebhookEvent
|
|
55
57
|
| OpenAI::Webhooks::AgentSessionFailedWebhookEvent
|
|
56
58
|
| OpenAI::Webhooks::AgentSessionIdleWebhookEvent
|