openai 0.96.0 → 0.97.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/agent.rb +2 -2
- data/lib/openai/models/beta/agent_browser_authentication_cancel_param.rb +23 -0
- data/lib/openai/models/beta/agent_browser_authentication_submit_param.rb +70 -0
- data/lib/openai/models/beta/agent_browser_origin_access_param.rb +45 -0
- data/lib/openai/models/beta/agent_create_params.rb +2 -2
- data/lib/openai/models/beta/agent_output_item.rb +276 -1
- data/lib/openai/models/beta/agent_session.rb +251 -5
- data/lib/openai/models/beta/agent_session_input_param.rb +64 -1
- data/lib/openai/models/beta/agent_session_item.rb +391 -1
- data/lib/openai/models/beta/agent_session_turn_item_added_event.rb +2 -2
- data/lib/openai/models/beta/agent_session_turn_item_done_event.rb +2 -2
- data/lib/openai/models/beta/agent_tool.rb +27 -1
- data/lib/openai/models/beta/agent_tool_param.rb +27 -1
- data/lib/openai/models/beta/agent_update_params.rb +2 -2
- data/lib/openai/models/beta/agents/environments/environment_template.rb +26 -2
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +48 -3
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +45 -3
- data/lib/openai/models/beta/agents/session_create_params.rb +2 -2
- data/lib/openai/models/beta/agents/sessions/event_create_params.rb +2 -2
- data/lib/openai/models/beta/environment.rb +26 -2
- data/lib/openai/models/beta/environment_param.rb +43 -3
- data/lib/openai/models/beta/persisted_agent_tool.rb +27 -1
- data/lib/openai/models/beta/persisted_agent_tool_param.rb +27 -1
- data/lib/openai/resources/beta/agents/environments/templates.rb +9 -2
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/items.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/items.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/turns/items.rb +1 -1
- data/lib/openai/resources/beta/agents.rb +2 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +3 -0
- data/rbi/openai/models/beta/agent.rbi +2 -1
- data/rbi/openai/models/beta/agent_browser_authentication_cancel_param.rbi +53 -0
- data/rbi/openai/models/beta/agent_browser_authentication_submit_param.rbi +125 -0
- data/rbi/openai/models/beta/agent_browser_origin_access_param.rbi +76 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +6 -3
- data/rbi/openai/models/beta/agent_output_item.rbi +422 -0
- data/rbi/openai/models/beta/agent_session.rbi +373 -1
- data/rbi/openai/models/beta/agent_session_input_param.rbi +102 -0
- data/rbi/openai/models/beta/agent_session_item.rbi +614 -0
- data/rbi/openai/models/beta/agent_session_turn_item_added_event.rbi +3 -0
- data/rbi/openai/models/beta/agent_session_turn_item_done_event.rbi +2 -0
- data/rbi/openai/models/beta/agent_tool.rbi +49 -1
- data/rbi/openai/models/beta/agent_tool_param.rbi +52 -1
- data/rbi/openai/models/beta/agent_update_params.rbi +6 -3
- data/rbi/openai/models/beta/agents/environments/environment_template.rbi +53 -2
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +74 -4
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +71 -4
- data/rbi/openai/models/beta/agents/session_create_params.rbi +6 -3
- data/rbi/openai/models/beta/agents/sessions/event_create_params.rbi +3 -0
- data/rbi/openai/models/beta/environment.rbi +53 -2
- data/rbi/openai/models/beta/environment_param.rbi +72 -4
- data/rbi/openai/models/beta/persisted_agent_tool.rbi +49 -1
- data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +52 -1
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +7 -0
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +1 -0
- data/rbi/openai/resources/beta/agents.rbi +4 -2
- data/sig/openai/models/beta/agent_browser_authentication_cancel_param.rbs +21 -0
- data/sig/openai/models/beta/agent_browser_authentication_submit_param.rbs +63 -0
- data/sig/openai/models/beta/agent_browser_origin_access_param.rbs +47 -0
- data/sig/openai/models/beta/agent_output_item.rbs +254 -0
- data/sig/openai/models/beta/agent_session.rbs +215 -1
- data/sig/openai/models/beta/agent_session_input_param.rbs +51 -1
- data/sig/openai/models/beta/agent_session_item.rbs +362 -0
- data/sig/openai/models/beta/agent_tool.rbs +22 -0
- data/sig/openai/models/beta/agent_tool_param.rbs +25 -0
- data/sig/openai/models/beta/agents/environments/environment_template.rbs +29 -3
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +39 -4
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +37 -4
- data/sig/openai/models/beta/environment.rbs +29 -3
- data/sig/openai/models/beta/environment_param.rbs +39 -4
- data/sig/openai/models/beta/persisted_agent_tool.rbs +22 -0
- data/sig/openai/models/beta/persisted_agent_tool_param.rbs +25 -0
- data/sig/openai/resources/beta/agents/environments/templates.rbs +2 -0
- metadata +10 -1
|
@@ -8,6 +8,9 @@ module OpenAI
|
|
|
8
8
|
| OpenAI::Beta::AgentSessionItem::FunctionCallOutput
|
|
9
9
|
| OpenAI::Beta::AgentSessionItem::AgentMessage
|
|
10
10
|
| OpenAI::Beta::AgentMcpCallItem
|
|
11
|
+
| OpenAI::Beta::AgentSessionItem::ComputerUseCall
|
|
12
|
+
| OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest
|
|
13
|
+
| OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult
|
|
11
14
|
| OpenAI::Beta::AgentWebSearchCallItem
|
|
12
15
|
| OpenAI::Beta::AgentCommandExecutionItem
|
|
13
16
|
| OpenAI::Beta::AgentCreateSubagentCallItem
|
|
@@ -148,6 +151,365 @@ module OpenAI
|
|
|
148
151
|
}
|
|
149
152
|
end
|
|
150
153
|
|
|
154
|
+
type computer_use_call =
|
|
155
|
+
{
|
|
156
|
+
id: String,
|
|
157
|
+
output: OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output?,
|
|
158
|
+
status: OpenAI::Models::Beta::agent_function_call_status,
|
|
159
|
+
title: String?,
|
|
160
|
+
turn_id: String,
|
|
161
|
+
?type: :computer_use_call
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
class ComputerUseCall < OpenAI::Internal::Type::BaseModel
|
|
165
|
+
# The ID of the activity item.
|
|
166
|
+
attr_accessor id: String
|
|
167
|
+
|
|
168
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
169
|
+
# disabled or the call emitted no screenshot.
|
|
170
|
+
attr_accessor output: OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output?
|
|
171
|
+
|
|
172
|
+
# The execution status of the activity.
|
|
173
|
+
attr_accessor status: OpenAI::Models::Beta::agent_function_call_status
|
|
174
|
+
|
|
175
|
+
# A model-generated description of the activity, when available.
|
|
176
|
+
attr_accessor title: String?
|
|
177
|
+
|
|
178
|
+
# The ID of the turn that contains this item.
|
|
179
|
+
attr_accessor turn_id: String
|
|
180
|
+
|
|
181
|
+
# The item type. Always `computer_use_call`.
|
|
182
|
+
attr_accessor type: :computer_use_call
|
|
183
|
+
|
|
184
|
+
# @param id
|
|
185
|
+
# The ID of the activity item.
|
|
186
|
+
# @param output
|
|
187
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
188
|
+
# disabled or the call emitted no screenshot.
|
|
189
|
+
# @param status
|
|
190
|
+
# The execution status of the activity.
|
|
191
|
+
# @param title
|
|
192
|
+
# A model-generated description of the activity, when available.
|
|
193
|
+
# @param turn_id
|
|
194
|
+
# The ID of the turn that contains this item.
|
|
195
|
+
# @param type
|
|
196
|
+
# The item type. Always `computer_use_call`.
|
|
197
|
+
def initialize: (
|
|
198
|
+
id: String,
|
|
199
|
+
output: OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output?,
|
|
200
|
+
status: OpenAI::Models::Beta::agent_function_call_status,
|
|
201
|
+
title: String?,
|
|
202
|
+
turn_id: String,
|
|
203
|
+
?type: :computer_use_call
|
|
204
|
+
) -> void
|
|
205
|
+
|
|
206
|
+
def to_hash: -> {
|
|
207
|
+
id: String,
|
|
208
|
+
output: OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output?,
|
|
209
|
+
status: OpenAI::Models::Beta::agent_function_call_status,
|
|
210
|
+
title: String?,
|
|
211
|
+
turn_id: String,
|
|
212
|
+
?type: :computer_use_call
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
type output = { image_url: String, ?type: :computer_screenshot }
|
|
216
|
+
|
|
217
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
218
|
+
# The complete JPEG image as a base64 data URL.
|
|
219
|
+
attr_accessor image_url: String
|
|
220
|
+
|
|
221
|
+
# The content type. Always `computer_screenshot`.
|
|
222
|
+
attr_accessor type: :computer_screenshot
|
|
223
|
+
|
|
224
|
+
# @param image_url
|
|
225
|
+
# The complete JPEG image as a base64 data URL.
|
|
226
|
+
# @param type
|
|
227
|
+
# The content type. Always `computer_screenshot`.
|
|
228
|
+
def initialize: (
|
|
229
|
+
image_url: String,
|
|
230
|
+
?type: :computer_screenshot
|
|
231
|
+
) -> void
|
|
232
|
+
|
|
233
|
+
def to_hash: -> { image_url: String, ?type: :computer_screenshot }
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
type computer_use_approval_request =
|
|
238
|
+
{
|
|
239
|
+
id: String,
|
|
240
|
+
request: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request,
|
|
241
|
+
request_id: String,
|
|
242
|
+
turn_id: String,
|
|
243
|
+
?type: :computer_use_approval_request
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
class ComputerUseApprovalRequest < OpenAI::Internal::Type::BaseModel
|
|
247
|
+
# The stable history item ID.
|
|
248
|
+
attr_accessor id: String
|
|
249
|
+
|
|
250
|
+
# A registered form awaiting the application's response.
|
|
251
|
+
attr_accessor request: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request
|
|
252
|
+
|
|
253
|
+
attr_accessor request_id: String
|
|
254
|
+
|
|
255
|
+
attr_accessor turn_id: String
|
|
256
|
+
|
|
257
|
+
# The item type. Always computer_use_approval_request.
|
|
258
|
+
attr_accessor type: :computer_use_approval_request
|
|
259
|
+
|
|
260
|
+
# @param id
|
|
261
|
+
# The stable history item ID.
|
|
262
|
+
# @param request
|
|
263
|
+
# A registered form awaiting the application's response.
|
|
264
|
+
# @param type
|
|
265
|
+
# The item type. Always computer_use_approval_request.
|
|
266
|
+
def initialize: (
|
|
267
|
+
id: String,
|
|
268
|
+
request: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request,
|
|
269
|
+
request_id: String,
|
|
270
|
+
turn_id: String,
|
|
271
|
+
?type: :computer_use_approval_request
|
|
272
|
+
) -> void
|
|
273
|
+
|
|
274
|
+
def to_hash: -> {
|
|
275
|
+
id: String,
|
|
276
|
+
request: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request,
|
|
277
|
+
request_id: String,
|
|
278
|
+
turn_id: String,
|
|
279
|
+
?type: :computer_use_approval_request
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
type request =
|
|
283
|
+
{
|
|
284
|
+
credential_origin: String?,
|
|
285
|
+
fields: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field],
|
|
286
|
+
options: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option],
|
|
287
|
+
reason: String?,
|
|
288
|
+
?type: :browser_authentication
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
class Request < OpenAI::Internal::Type::BaseModel
|
|
292
|
+
# The registered form or frame origin where values will be entered.
|
|
293
|
+
attr_accessor credential_origin: String?
|
|
294
|
+
|
|
295
|
+
# Controls to render. All submitted values are sensitive.
|
|
296
|
+
attr_accessor fields: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field]
|
|
297
|
+
|
|
298
|
+
# Sign-in methods. Empty for a plain form.
|
|
299
|
+
attr_accessor options: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option]
|
|
300
|
+
|
|
301
|
+
# Why the agent needs the user to sign in.
|
|
302
|
+
attr_accessor reason: String?
|
|
303
|
+
|
|
304
|
+
# The type of the object. Always `browser_authentication`.
|
|
305
|
+
attr_accessor type: :browser_authentication
|
|
306
|
+
|
|
307
|
+
# @param credential_origin
|
|
308
|
+
# The registered form or frame origin where values will be entered.
|
|
309
|
+
# @param fields
|
|
310
|
+
# Controls to render. All submitted values are sensitive.
|
|
311
|
+
# @param options
|
|
312
|
+
# Sign-in methods. Empty for a plain form.
|
|
313
|
+
# @param reason
|
|
314
|
+
# Why the agent needs the user to sign in.
|
|
315
|
+
# @param type
|
|
316
|
+
# The type of the object. Always `browser_authentication`.
|
|
317
|
+
def initialize: (
|
|
318
|
+
credential_origin: String?,
|
|
319
|
+
fields: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field],
|
|
320
|
+
options: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option],
|
|
321
|
+
reason: String?,
|
|
322
|
+
?type: :browser_authentication
|
|
323
|
+
) -> void
|
|
324
|
+
|
|
325
|
+
def to_hash: -> {
|
|
326
|
+
credential_origin: String?,
|
|
327
|
+
fields: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field],
|
|
328
|
+
options: ::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option],
|
|
329
|
+
reason: String?,
|
|
330
|
+
?type: :browser_authentication
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
type field =
|
|
334
|
+
{ id: String, label: String, required: bool, type: String }
|
|
335
|
+
|
|
336
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
337
|
+
# The field ID to submit as field_id in a fields entry.
|
|
338
|
+
attr_accessor id: String
|
|
339
|
+
|
|
340
|
+
# The label to display beside the control.
|
|
341
|
+
attr_accessor label: String
|
|
342
|
+
|
|
343
|
+
# Whether this control requires a nonempty value.
|
|
344
|
+
attr_accessor required: bool
|
|
345
|
+
|
|
346
|
+
# The rendering type, such as email, password, or text.
|
|
347
|
+
attr_accessor type: String
|
|
348
|
+
|
|
349
|
+
# @param id
|
|
350
|
+
# The field ID to submit as field_id in a fields entry.
|
|
351
|
+
# @param label
|
|
352
|
+
# The label to display beside the control.
|
|
353
|
+
# @param required
|
|
354
|
+
# Whether this control requires a nonempty value.
|
|
355
|
+
# @param type
|
|
356
|
+
# The rendering type, such as email, password, or text.
|
|
357
|
+
def initialize: (
|
|
358
|
+
id: String,
|
|
359
|
+
label: String,
|
|
360
|
+
required: bool,
|
|
361
|
+
type: String
|
|
362
|
+
) -> void
|
|
363
|
+
|
|
364
|
+
def to_hash: -> {
|
|
365
|
+
id: String,
|
|
366
|
+
label: String,
|
|
367
|
+
required: bool,
|
|
368
|
+
type: String
|
|
369
|
+
}
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
type option =
|
|
373
|
+
{ id: String, field_ids: ::Array[String], label: String }
|
|
374
|
+
|
|
375
|
+
class Option < OpenAI::Internal::Type::BaseModel
|
|
376
|
+
# The option ID to submit as selected_option.
|
|
377
|
+
attr_accessor id: String
|
|
378
|
+
|
|
379
|
+
# IDs from the registered fields that this method accepts.
|
|
380
|
+
attr_accessor field_ids: ::Array[String]
|
|
381
|
+
|
|
382
|
+
# The method label to display.
|
|
383
|
+
attr_accessor label: String
|
|
384
|
+
|
|
385
|
+
# @param id
|
|
386
|
+
# The option ID to submit as selected_option.
|
|
387
|
+
# @param field_ids
|
|
388
|
+
# IDs from the registered fields that this method accepts.
|
|
389
|
+
# @param label
|
|
390
|
+
# The method label to display.
|
|
391
|
+
def initialize: (
|
|
392
|
+
id: String,
|
|
393
|
+
field_ids: ::Array[String],
|
|
394
|
+
label: String
|
|
395
|
+
) -> void
|
|
396
|
+
|
|
397
|
+
def to_hash: -> {
|
|
398
|
+
id: String,
|
|
399
|
+
field_ids: ::Array[String],
|
|
400
|
+
label: String
|
|
401
|
+
}
|
|
402
|
+
end
|
|
403
|
+
end
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
type computer_use_approval_request_result =
|
|
407
|
+
{
|
|
408
|
+
id: String,
|
|
409
|
+
request_id: String,
|
|
410
|
+
response: OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::response,
|
|
411
|
+
turn_id: String,
|
|
412
|
+
?type: :computer_use_approval_request_result
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
class ComputerUseApprovalRequestResult < OpenAI::Internal::Type::BaseModel
|
|
416
|
+
# The stable history item ID.
|
|
417
|
+
attr_accessor id: String
|
|
418
|
+
|
|
419
|
+
# The registered request answered by this item.
|
|
420
|
+
attr_accessor request_id: String
|
|
421
|
+
|
|
422
|
+
# The admitted response, without submitted credential values.
|
|
423
|
+
attr_accessor response: OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::response
|
|
424
|
+
|
|
425
|
+
# The ID of the turn that contains this item.
|
|
426
|
+
attr_accessor turn_id: String
|
|
427
|
+
|
|
428
|
+
attr_accessor type: :computer_use_approval_request_result
|
|
429
|
+
|
|
430
|
+
# @param id
|
|
431
|
+
# The stable history item ID.
|
|
432
|
+
# @param request_id
|
|
433
|
+
# The registered request answered by this item.
|
|
434
|
+
# @param response
|
|
435
|
+
# The admitted response, without submitted credential values.
|
|
436
|
+
# @param turn_id
|
|
437
|
+
# The ID of the turn that contains this item.
|
|
438
|
+
def initialize: (
|
|
439
|
+
id: String,
|
|
440
|
+
request_id: String,
|
|
441
|
+
response: OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::response,
|
|
442
|
+
turn_id: String,
|
|
443
|
+
?type: :computer_use_approval_request_result
|
|
444
|
+
) -> void
|
|
445
|
+
|
|
446
|
+
def to_hash: -> {
|
|
447
|
+
id: String,
|
|
448
|
+
request_id: String,
|
|
449
|
+
response: OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::response,
|
|
450
|
+
turn_id: String,
|
|
451
|
+
?type: :computer_use_approval_request_result
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
type response =
|
|
455
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Submit
|
|
456
|
+
| OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Cancel
|
|
457
|
+
|
|
458
|
+
module Response
|
|
459
|
+
extend OpenAI::Internal::Type::Union
|
|
460
|
+
|
|
461
|
+
type submit =
|
|
462
|
+
{
|
|
463
|
+
?action: :submit,
|
|
464
|
+
selected_option: String?,
|
|
465
|
+
?type: :browser_authentication
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
class Submit < OpenAI::Internal::Type::BaseModel
|
|
469
|
+
attr_accessor action: :submit
|
|
470
|
+
|
|
471
|
+
# The chosen sign-in method, or null when no options were offered.
|
|
472
|
+
attr_accessor selected_option: String?
|
|
473
|
+
|
|
474
|
+
attr_accessor type: :browser_authentication
|
|
475
|
+
|
|
476
|
+
# @param selected_option
|
|
477
|
+
# The chosen sign-in method, or null when no options were offered.
|
|
478
|
+
def initialize: (
|
|
479
|
+
selected_option: String?,
|
|
480
|
+
?action: :submit,
|
|
481
|
+
?type: :browser_authentication
|
|
482
|
+
) -> void
|
|
483
|
+
|
|
484
|
+
def to_hash: -> {
|
|
485
|
+
?action: :submit,
|
|
486
|
+
selected_option: String?,
|
|
487
|
+
?type: :browser_authentication
|
|
488
|
+
}
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
type cancel = { ?action: :cancel, ?type: :browser_authentication }
|
|
492
|
+
|
|
493
|
+
class Cancel < OpenAI::Internal::Type::BaseModel
|
|
494
|
+
attr_accessor action: :cancel
|
|
495
|
+
|
|
496
|
+
attr_accessor type: :browser_authentication
|
|
497
|
+
|
|
498
|
+
def initialize: (
|
|
499
|
+
?action: :cancel,
|
|
500
|
+
?type: :browser_authentication
|
|
501
|
+
) -> void
|
|
502
|
+
|
|
503
|
+
def to_hash: -> {
|
|
504
|
+
?action: :cancel,
|
|
505
|
+
?type: :browser_authentication
|
|
506
|
+
}
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::response]
|
|
510
|
+
end
|
|
511
|
+
end
|
|
512
|
+
|
|
151
513
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::agent_session_item]
|
|
152
514
|
end
|
|
153
515
|
end
|
|
@@ -6,6 +6,7 @@ module OpenAI
|
|
|
6
6
|
| OpenAI::Beta::AgentTool::ProgrammaticToolCalling
|
|
7
7
|
| OpenAI::Beta::AgentTool::Mcp
|
|
8
8
|
| OpenAI::Beta::AgentTool::WebSearch
|
|
9
|
+
| OpenAI::Beta::AgentTool::ComputerUse
|
|
9
10
|
|
|
10
11
|
module AgentTool
|
|
11
12
|
extend OpenAI::Internal::Type::Union
|
|
@@ -293,6 +294,27 @@ module OpenAI
|
|
|
293
294
|
end
|
|
294
295
|
end
|
|
295
296
|
|
|
297
|
+
type computer_use = { include_screenshots: bool, ?type: :computer_use }
|
|
298
|
+
|
|
299
|
+
class ComputerUse < OpenAI::Internal::Type::BaseModel
|
|
300
|
+
# Whether computer tool outputs include screenshots.
|
|
301
|
+
attr_accessor include_screenshots: bool
|
|
302
|
+
|
|
303
|
+
# The type of the object. Always `computer_use`.
|
|
304
|
+
attr_accessor type: :computer_use
|
|
305
|
+
|
|
306
|
+
# @param include_screenshots
|
|
307
|
+
# Whether computer tool outputs include screenshots.
|
|
308
|
+
# @param type
|
|
309
|
+
# The type of the object. Always `computer_use`.
|
|
310
|
+
def initialize: (
|
|
311
|
+
include_screenshots: bool,
|
|
312
|
+
?type: :computer_use
|
|
313
|
+
) -> void
|
|
314
|
+
|
|
315
|
+
def to_hash: -> { include_screenshots: bool, ?type: :computer_use }
|
|
316
|
+
end
|
|
317
|
+
|
|
296
318
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::agent_tool]
|
|
297
319
|
end
|
|
298
320
|
end
|
|
@@ -7,6 +7,7 @@ module OpenAI
|
|
|
7
7
|
| OpenAI::Beta::AgentToolParam::ProgrammaticToolCalling
|
|
8
8
|
| OpenAI::Beta::AgentToolParam::Mcp
|
|
9
9
|
| OpenAI::Beta::AgentToolParam::WebSearch
|
|
10
|
+
| OpenAI::Beta::AgentToolParam::ComputerUse
|
|
10
11
|
|
|
11
12
|
module AgentToolParam
|
|
12
13
|
extend OpenAI::Internal::Type::Union
|
|
@@ -334,6 +335,30 @@ module OpenAI
|
|
|
334
335
|
end
|
|
335
336
|
end
|
|
336
337
|
|
|
338
|
+
type computer_use = { ?type: :computer_use, ?include_screenshots: bool }
|
|
339
|
+
|
|
340
|
+
class ComputerUse < OpenAI::Internal::Type::BaseModel
|
|
341
|
+
# The type of the object. Always `computer_use`.
|
|
342
|
+
attr_accessor type: :computer_use
|
|
343
|
+
|
|
344
|
+
# Whether computer tool outputs include screenshots. Defaults to `false`.
|
|
345
|
+
attr_reader include_screenshots: bool?
|
|
346
|
+
|
|
347
|
+
# Whether computer tool outputs include screenshots. Defaults to `false`.
|
|
348
|
+
def include_screenshots=: (bool) -> bool
|
|
349
|
+
|
|
350
|
+
# @param include_screenshots
|
|
351
|
+
# Whether computer tool outputs include screenshots. Defaults to `false`.
|
|
352
|
+
# @param type
|
|
353
|
+
# The type of the object. Always `computer_use`.
|
|
354
|
+
def initialize: (
|
|
355
|
+
?include_screenshots: bool,
|
|
356
|
+
?type: :computer_use
|
|
357
|
+
) -> void
|
|
358
|
+
|
|
359
|
+
def to_hash: -> { ?type: :computer_use, ?include_screenshots: bool }
|
|
360
|
+
end
|
|
361
|
+
|
|
337
362
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::agent_tool_param]
|
|
338
363
|
end
|
|
339
364
|
end
|
|
@@ -17,7 +17,8 @@ module OpenAI
|
|
|
17
17
|
packages: OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Packages,
|
|
18
18
|
plugins: ::Array[OpenAI::Beta::HostedPlugin],
|
|
19
19
|
skills: ::Array[OpenAI::Models::Beta::Agents::Environments::EnvironmentTemplate::skill],
|
|
20
|
-
updated_at: Integer
|
|
20
|
+
updated_at: Integer,
|
|
21
|
+
?desktop: OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Desktop
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
class EnvironmentTemplate < OpenAI::Internal::Type::BaseModel
|
|
@@ -54,6 +55,14 @@ module OpenAI
|
|
|
54
55
|
# The Unix timestamp, in seconds, when the template was last updated.
|
|
55
56
|
attr_accessor updated_at: Integer
|
|
56
57
|
|
|
58
|
+
# Desktop configuration for each OpenAI-hosted environment.
|
|
59
|
+
attr_reader desktop: OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Desktop?
|
|
60
|
+
|
|
61
|
+
# Desktop configuration for each OpenAI-hosted environment.
|
|
62
|
+
def desktop=: (
|
|
63
|
+
OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Desktop
|
|
64
|
+
) -> OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Desktop
|
|
65
|
+
|
|
57
66
|
# @param id
|
|
58
67
|
# The ID of the reusable environment template.
|
|
59
68
|
# @param capability_directories
|
|
@@ -74,6 +83,8 @@ module OpenAI
|
|
|
74
83
|
# Safe skill metadata, preserving unresolved version selectors.
|
|
75
84
|
# @param updated_at
|
|
76
85
|
# The Unix timestamp, in seconds, when the template was last updated.
|
|
86
|
+
# @param desktop
|
|
87
|
+
# Desktop configuration for each OpenAI-hosted environment.
|
|
77
88
|
# @param object
|
|
78
89
|
# The object type. Always `agent.environment.template`.
|
|
79
90
|
def initialize: (
|
|
@@ -87,6 +98,7 @@ module OpenAI
|
|
|
87
98
|
plugins: ::Array[OpenAI::Beta::HostedPlugin],
|
|
88
99
|
skills: ::Array[OpenAI::Models::Beta::Agents::Environments::EnvironmentTemplate::skill],
|
|
89
100
|
updated_at: Integer,
|
|
101
|
+
?desktop: OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Desktop,
|
|
90
102
|
?object: :"agent.environment.template"
|
|
91
103
|
) -> void
|
|
92
104
|
|
|
@@ -101,7 +113,8 @@ module OpenAI
|
|
|
101
113
|
packages: OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Packages,
|
|
102
114
|
plugins: ::Array[OpenAI::Beta::HostedPlugin],
|
|
103
115
|
skills: ::Array[OpenAI::Models::Beta::Agents::Environments::EnvironmentTemplate::skill],
|
|
104
|
-
updated_at: Integer
|
|
116
|
+
updated_at: Integer,
|
|
117
|
+
?desktop: OpenAI::Beta::Agents::Environments::EnvironmentTemplate::Desktop
|
|
105
118
|
}
|
|
106
119
|
|
|
107
120
|
type file =
|
|
@@ -215,7 +228,7 @@ module OpenAI
|
|
|
215
228
|
# Disables network access.
|
|
216
229
|
DISABLED: :disabled
|
|
217
230
|
|
|
218
|
-
#
|
|
231
|
+
# Applies the configured domain restrictions.
|
|
219
232
|
RESTRICTED: :restricted
|
|
220
233
|
|
|
221
234
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::Environments::EnvironmentTemplate::Network::access]
|
|
@@ -331,6 +344,19 @@ module OpenAI
|
|
|
331
344
|
|
|
332
345
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::Agents::Environments::EnvironmentTemplate::skill]
|
|
333
346
|
end
|
|
347
|
+
|
|
348
|
+
type desktop = { enabled: bool }
|
|
349
|
+
|
|
350
|
+
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
351
|
+
# Whether the environment provisions a desktop and browser proxy.
|
|
352
|
+
attr_accessor enabled: bool
|
|
353
|
+
|
|
354
|
+
# @param enabled
|
|
355
|
+
# Whether the environment provisions a desktop and browser proxy.
|
|
356
|
+
def initialize: (enabled: bool) -> void
|
|
357
|
+
|
|
358
|
+
def to_hash: -> { enabled: bool }
|
|
359
|
+
end
|
|
334
360
|
end
|
|
335
361
|
end
|
|
336
362
|
end
|
|
@@ -6,6 +6,7 @@ module OpenAI
|
|
|
6
6
|
type template_create_params =
|
|
7
7
|
{
|
|
8
8
|
?capability_directories: ::Array[String]?,
|
|
9
|
+
?desktop: OpenAI::Beta::Agents::Environments::TemplateCreateParams::Desktop?,
|
|
9
10
|
?env: ::Hash[Symbol, String]?,
|
|
10
11
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
11
12
|
?name: String?,
|
|
@@ -25,6 +26,10 @@ module OpenAI
|
|
|
25
26
|
# list.
|
|
26
27
|
attr_accessor capability_directories: ::Array[String]?
|
|
27
28
|
|
|
29
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
30
|
+
# defaults to disabled.
|
|
31
|
+
attr_accessor desktop: OpenAI::Beta::Agents::Environments::TemplateCreateParams::Desktop?
|
|
32
|
+
|
|
28
33
|
# Environment variables made available to the agent.
|
|
29
34
|
attr_accessor env: ::Hash[Symbol, String]?
|
|
30
35
|
|
|
@@ -54,6 +59,9 @@ module OpenAI
|
|
|
54
59
|
# @param capability_directories
|
|
55
60
|
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
56
61
|
# list.
|
|
62
|
+
# @param desktop
|
|
63
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
64
|
+
# defaults to disabled.
|
|
57
65
|
# @param env
|
|
58
66
|
# Environment variables made available to the agent.
|
|
59
67
|
# @param files
|
|
@@ -74,6 +82,7 @@ module OpenAI
|
|
|
74
82
|
# list.
|
|
75
83
|
def initialize: (
|
|
76
84
|
?capability_directories: ::Array[String]?,
|
|
85
|
+
?desktop: OpenAI::Beta::Agents::Environments::TemplateCreateParams::Desktop?,
|
|
77
86
|
?env: ::Hash[Symbol, String]?,
|
|
78
87
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
79
88
|
?name: String?,
|
|
@@ -87,6 +96,7 @@ module OpenAI
|
|
|
87
96
|
|
|
88
97
|
def to_hash: -> {
|
|
89
98
|
?capability_directories: ::Array[String]?,
|
|
99
|
+
?desktop: OpenAI::Beta::Agents::Environments::TemplateCreateParams::Desktop?,
|
|
90
100
|
?env: ::Hash[Symbol, String]?,
|
|
91
101
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
92
102
|
?name: String?,
|
|
@@ -98,10 +108,24 @@ module OpenAI
|
|
|
98
108
|
?request_options: OpenAI::RequestOptions
|
|
99
109
|
}
|
|
100
110
|
|
|
111
|
+
type desktop = { enabled: bool }
|
|
112
|
+
|
|
113
|
+
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
114
|
+
# Whether to provision the desktop and its browser proxy.
|
|
115
|
+
attr_accessor enabled: bool
|
|
116
|
+
|
|
117
|
+
# @param enabled
|
|
118
|
+
# Whether to provision the desktop and its browser proxy.
|
|
119
|
+
def initialize: (enabled: bool) -> void
|
|
120
|
+
|
|
121
|
+
def to_hash: -> { enabled: bool }
|
|
122
|
+
end
|
|
123
|
+
|
|
101
124
|
type network =
|
|
102
125
|
{
|
|
103
126
|
access: OpenAI::Models::Beta::Agents::Environments::TemplateCreateParams::Network::access,
|
|
104
|
-
?allowed_domains: ::Array[String]
|
|
127
|
+
?allowed_domains: ::Array[String]?,
|
|
128
|
+
?blocked_domains: ::Array[String]?
|
|
105
129
|
}
|
|
106
130
|
|
|
107
131
|
class Network < OpenAI::Internal::Type::BaseModel
|
|
@@ -111,18 +135,29 @@ module OpenAI
|
|
|
111
135
|
# Domains the environment may access when network access is restricted.
|
|
112
136
|
attr_accessor allowed_domains: ::Array[String]?
|
|
113
137
|
|
|
138
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
139
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
140
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
141
|
+
attr_accessor blocked_domains: ::Array[String]?
|
|
142
|
+
|
|
114
143
|
# @param access
|
|
115
144
|
# The environment's network access mode.
|
|
116
145
|
# @param allowed_domains
|
|
117
146
|
# Domains the environment may access when network access is restricted.
|
|
147
|
+
# @param blocked_domains
|
|
148
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
149
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
150
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
118
151
|
def initialize: (
|
|
119
152
|
access: OpenAI::Models::Beta::Agents::Environments::TemplateCreateParams::Network::access,
|
|
120
|
-
?allowed_domains: ::Array[String]
|
|
153
|
+
?allowed_domains: ::Array[String]?,
|
|
154
|
+
?blocked_domains: ::Array[String]?
|
|
121
155
|
) -> void
|
|
122
156
|
|
|
123
157
|
def to_hash: -> {
|
|
124
158
|
access: OpenAI::Models::Beta::Agents::Environments::TemplateCreateParams::Network::access,
|
|
125
|
-
?allowed_domains: ::Array[String]
|
|
159
|
+
?allowed_domains: ::Array[String]?,
|
|
160
|
+
?blocked_domains: ::Array[String]?
|
|
126
161
|
}
|
|
127
162
|
|
|
128
163
|
type access = :enabled | :disabled | :restricted
|
|
@@ -136,7 +171,7 @@ module OpenAI
|
|
|
136
171
|
# Disables network access.
|
|
137
172
|
DISABLED: :disabled
|
|
138
173
|
|
|
139
|
-
#
|
|
174
|
+
# Applies the configured domain restrictions.
|
|
140
175
|
RESTRICTED: :restricted
|
|
141
176
|
|
|
142
177
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::Environments::TemplateCreateParams::Network::access]
|