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
|
@@ -17,6 +17,9 @@ module OpenAI
|
|
|
17
17
|
OpenAI::Beta::AgentSessionItem::FunctionCallOutput,
|
|
18
18
|
OpenAI::Beta::AgentSessionItem::AgentMessage,
|
|
19
19
|
OpenAI::Beta::AgentMcpCallItem,
|
|
20
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseCall,
|
|
21
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest,
|
|
22
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult,
|
|
20
23
|
OpenAI::Beta::AgentWebSearchCallItem,
|
|
21
24
|
OpenAI::Beta::AgentCommandExecutionItem,
|
|
22
25
|
OpenAI::Beta::AgentCreateSubagentCallItem,
|
|
@@ -227,6 +230,617 @@ module OpenAI
|
|
|
227
230
|
|
|
228
231
|
end
|
|
229
232
|
|
|
233
|
+
class ComputerUseCall < OpenAI::Internal::Type::BaseModel
|
|
234
|
+
OrHash = T.type_alias do
|
|
235
|
+
T.any(
|
|
236
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseCall,
|
|
237
|
+
OpenAI::Internal::AnyHash
|
|
238
|
+
)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# The ID of the activity item.
|
|
242
|
+
sig { returns(String) }
|
|
243
|
+
attr_accessor :id
|
|
244
|
+
|
|
245
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
246
|
+
# disabled or the call emitted no screenshot.
|
|
247
|
+
sig { returns(T.nilable(OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output)) }
|
|
248
|
+
attr_reader :output
|
|
249
|
+
|
|
250
|
+
sig { params(output: T.nilable(OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output::OrHash)).void }
|
|
251
|
+
attr_writer :output
|
|
252
|
+
|
|
253
|
+
# The execution status of the activity.
|
|
254
|
+
sig { returns(OpenAI::Beta::AgentFunctionCallStatus::TaggedSymbol) }
|
|
255
|
+
attr_accessor :status
|
|
256
|
+
|
|
257
|
+
# A model-generated description of the activity, when available.
|
|
258
|
+
sig { returns(T.nilable(String)) }
|
|
259
|
+
attr_accessor :title
|
|
260
|
+
|
|
261
|
+
# The ID of the turn that contains this item.
|
|
262
|
+
sig { returns(String) }
|
|
263
|
+
attr_accessor :turn_id
|
|
264
|
+
|
|
265
|
+
# The item type. Always `computer_use_call`.
|
|
266
|
+
sig { returns(Symbol) }
|
|
267
|
+
attr_accessor :type
|
|
268
|
+
|
|
269
|
+
# One execution of the platform-provided computer-use capability.
|
|
270
|
+
sig do
|
|
271
|
+
params(
|
|
272
|
+
|
|
273
|
+
id: String,
|
|
274
|
+
|
|
275
|
+
output: T.nilable(OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output::OrHash),
|
|
276
|
+
|
|
277
|
+
status: OpenAI::Beta::AgentFunctionCallStatus::OrSymbol,
|
|
278
|
+
|
|
279
|
+
title: T.nilable(String),
|
|
280
|
+
|
|
281
|
+
turn_id: String,
|
|
282
|
+
|
|
283
|
+
type: Symbol
|
|
284
|
+
)
|
|
285
|
+
.returns(T.attached_class)
|
|
286
|
+
end
|
|
287
|
+
def self.new(
|
|
288
|
+
|
|
289
|
+
# The ID of the activity item.
|
|
290
|
+
id:,
|
|
291
|
+
|
|
292
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
293
|
+
# disabled or the call emitted no screenshot.
|
|
294
|
+
output:,
|
|
295
|
+
|
|
296
|
+
# The execution status of the activity.
|
|
297
|
+
status:,
|
|
298
|
+
|
|
299
|
+
# A model-generated description of the activity, when available.
|
|
300
|
+
title:,
|
|
301
|
+
|
|
302
|
+
# The ID of the turn that contains this item.
|
|
303
|
+
turn_id:,
|
|
304
|
+
|
|
305
|
+
# The item type. Always `computer_use_call`.
|
|
306
|
+
|
|
307
|
+
type: :computer_use_call
|
|
308
|
+
)
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
sig do
|
|
312
|
+
override.returns(
|
|
313
|
+
{
|
|
314
|
+
id: String,
|
|
315
|
+
output: T.nilable(OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output),
|
|
316
|
+
status: OpenAI::Beta::AgentFunctionCallStatus::TaggedSymbol,
|
|
317
|
+
title: T.nilable(String),
|
|
318
|
+
turn_id: String,
|
|
319
|
+
type: Symbol
|
|
320
|
+
}
|
|
321
|
+
)
|
|
322
|
+
end
|
|
323
|
+
def to_hash
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
327
|
+
OrHash = T.type_alias do
|
|
328
|
+
T.any(
|
|
329
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseCall::Output,
|
|
330
|
+
OpenAI::Internal::AnyHash
|
|
331
|
+
)
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# The complete JPEG image as a base64 data URL.
|
|
335
|
+
sig { returns(String) }
|
|
336
|
+
attr_accessor :image_url
|
|
337
|
+
|
|
338
|
+
# The content type. Always `computer_screenshot`.
|
|
339
|
+
sig { returns(Symbol) }
|
|
340
|
+
attr_accessor :type
|
|
341
|
+
|
|
342
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
343
|
+
# disabled or the call emitted no screenshot.
|
|
344
|
+
sig do
|
|
345
|
+
params(
|
|
346
|
+
|
|
347
|
+
image_url: String,
|
|
348
|
+
|
|
349
|
+
type: Symbol
|
|
350
|
+
)
|
|
351
|
+
.returns(T.attached_class)
|
|
352
|
+
end
|
|
353
|
+
def self.new(
|
|
354
|
+
|
|
355
|
+
# The complete JPEG image as a base64 data URL.
|
|
356
|
+
image_url:,
|
|
357
|
+
|
|
358
|
+
# The content type. Always `computer_screenshot`.
|
|
359
|
+
|
|
360
|
+
type: :computer_screenshot
|
|
361
|
+
)
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
sig do
|
|
365
|
+
override.returns(
|
|
366
|
+
{image_url: String, type: Symbol}
|
|
367
|
+
)
|
|
368
|
+
end
|
|
369
|
+
def to_hash
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
end
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
class ComputerUseApprovalRequest < OpenAI::Internal::Type::BaseModel
|
|
376
|
+
OrHash = T.type_alias do
|
|
377
|
+
T.any(
|
|
378
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest,
|
|
379
|
+
OpenAI::Internal::AnyHash
|
|
380
|
+
)
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# The stable history item ID.
|
|
384
|
+
sig { returns(String) }
|
|
385
|
+
attr_accessor :id
|
|
386
|
+
|
|
387
|
+
# A registered form awaiting the application's response.
|
|
388
|
+
sig { returns(OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request) }
|
|
389
|
+
attr_reader :request
|
|
390
|
+
|
|
391
|
+
sig { params(request: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::OrHash).void }
|
|
392
|
+
attr_writer :request
|
|
393
|
+
|
|
394
|
+
sig { returns(String) }
|
|
395
|
+
attr_accessor :request_id
|
|
396
|
+
|
|
397
|
+
sig { returns(String) }
|
|
398
|
+
attr_accessor :turn_id
|
|
399
|
+
|
|
400
|
+
# The item type. Always computer_use_approval_request.
|
|
401
|
+
sig { returns(Symbol) }
|
|
402
|
+
attr_accessor :type
|
|
403
|
+
|
|
404
|
+
# A credential-free history record of the emitted login request.
|
|
405
|
+
sig do
|
|
406
|
+
params(
|
|
407
|
+
|
|
408
|
+
id: String,
|
|
409
|
+
|
|
410
|
+
request: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::OrHash,
|
|
411
|
+
|
|
412
|
+
request_id: String,
|
|
413
|
+
|
|
414
|
+
turn_id: String,
|
|
415
|
+
|
|
416
|
+
type: Symbol
|
|
417
|
+
)
|
|
418
|
+
.returns(T.attached_class)
|
|
419
|
+
end
|
|
420
|
+
def self.new(
|
|
421
|
+
|
|
422
|
+
# The stable history item ID.
|
|
423
|
+
id:,
|
|
424
|
+
|
|
425
|
+
# A registered form awaiting the application's response.
|
|
426
|
+
request:,
|
|
427
|
+
|
|
428
|
+
request_id:,
|
|
429
|
+
|
|
430
|
+
turn_id:,
|
|
431
|
+
|
|
432
|
+
# The item type. Always computer_use_approval_request.
|
|
433
|
+
|
|
434
|
+
type: :computer_use_approval_request
|
|
435
|
+
)
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
sig do
|
|
439
|
+
override.returns(
|
|
440
|
+
{
|
|
441
|
+
id: String,
|
|
442
|
+
request: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request,
|
|
443
|
+
request_id: String,
|
|
444
|
+
turn_id: String,
|
|
445
|
+
type: Symbol
|
|
446
|
+
}
|
|
447
|
+
)
|
|
448
|
+
end
|
|
449
|
+
def to_hash
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
class Request < OpenAI::Internal::Type::BaseModel
|
|
453
|
+
OrHash = T.type_alias do
|
|
454
|
+
T.any(
|
|
455
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request,
|
|
456
|
+
OpenAI::Internal::AnyHash
|
|
457
|
+
)
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# The registered form or frame origin where values will be entered.
|
|
461
|
+
sig { returns(T.nilable(String)) }
|
|
462
|
+
attr_accessor :credential_origin
|
|
463
|
+
|
|
464
|
+
# Controls to render. All submitted values are sensitive.
|
|
465
|
+
sig { returns(T::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field]) }
|
|
466
|
+
attr_accessor :fields
|
|
467
|
+
|
|
468
|
+
# Sign-in methods. Empty for a plain form.
|
|
469
|
+
sig { returns(T::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option]) }
|
|
470
|
+
attr_accessor :options
|
|
471
|
+
|
|
472
|
+
# Why the agent needs the user to sign in.
|
|
473
|
+
sig { returns(T.nilable(String)) }
|
|
474
|
+
attr_accessor :reason
|
|
475
|
+
|
|
476
|
+
# The type of the object. Always `browser_authentication`.
|
|
477
|
+
sig { returns(Symbol) }
|
|
478
|
+
attr_accessor :type
|
|
479
|
+
|
|
480
|
+
# A registered form awaiting the application's response.
|
|
481
|
+
sig do
|
|
482
|
+
params(
|
|
483
|
+
|
|
484
|
+
credential_origin: T.nilable(String),
|
|
485
|
+
|
|
486
|
+
fields: T::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field::OrHash],
|
|
487
|
+
|
|
488
|
+
options: T::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option::OrHash],
|
|
489
|
+
|
|
490
|
+
reason: T.nilable(String),
|
|
491
|
+
|
|
492
|
+
type: Symbol
|
|
493
|
+
)
|
|
494
|
+
.returns(T.attached_class)
|
|
495
|
+
end
|
|
496
|
+
def self.new(
|
|
497
|
+
|
|
498
|
+
# The registered form or frame origin where values will be entered.
|
|
499
|
+
credential_origin:,
|
|
500
|
+
|
|
501
|
+
# Controls to render. All submitted values are sensitive.
|
|
502
|
+
fields:,
|
|
503
|
+
|
|
504
|
+
# Sign-in methods. Empty for a plain form.
|
|
505
|
+
options:,
|
|
506
|
+
|
|
507
|
+
# Why the agent needs the user to sign in.
|
|
508
|
+
reason:,
|
|
509
|
+
|
|
510
|
+
# The type of the object. Always `browser_authentication`.
|
|
511
|
+
|
|
512
|
+
type: :browser_authentication
|
|
513
|
+
)
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
sig do
|
|
517
|
+
override.returns(
|
|
518
|
+
{
|
|
519
|
+
credential_origin: T.nilable(String),
|
|
520
|
+
fields: T::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field],
|
|
521
|
+
options: T::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option],
|
|
522
|
+
reason: T.nilable(String),
|
|
523
|
+
type: Symbol
|
|
524
|
+
}
|
|
525
|
+
)
|
|
526
|
+
end
|
|
527
|
+
def to_hash
|
|
528
|
+
end
|
|
529
|
+
|
|
530
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
531
|
+
OrHash = T.type_alias do
|
|
532
|
+
T.any(
|
|
533
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Field,
|
|
534
|
+
OpenAI::Internal::AnyHash
|
|
535
|
+
)
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
# The field ID to submit as field_id in a fields entry.
|
|
539
|
+
sig { returns(String) }
|
|
540
|
+
attr_accessor :id
|
|
541
|
+
|
|
542
|
+
# The label to display beside the control.
|
|
543
|
+
sig { returns(String) }
|
|
544
|
+
attr_accessor :label
|
|
545
|
+
|
|
546
|
+
# Whether this control requires a nonempty value.
|
|
547
|
+
sig { returns(T::Boolean) }
|
|
548
|
+
attr_accessor :required
|
|
549
|
+
|
|
550
|
+
# The rendering type, such as email, password, or text.
|
|
551
|
+
sig { returns(String) }
|
|
552
|
+
attr_accessor :type
|
|
553
|
+
|
|
554
|
+
# A control in a registered browser-login form.
|
|
555
|
+
sig do
|
|
556
|
+
params(
|
|
557
|
+
|
|
558
|
+
id: String,
|
|
559
|
+
|
|
560
|
+
label: String,
|
|
561
|
+
|
|
562
|
+
required: T::Boolean,
|
|
563
|
+
|
|
564
|
+
type: String
|
|
565
|
+
)
|
|
566
|
+
.returns(T.attached_class)
|
|
567
|
+
end
|
|
568
|
+
def self.new(
|
|
569
|
+
|
|
570
|
+
# The field ID to submit as field_id in a fields entry.
|
|
571
|
+
id:,
|
|
572
|
+
|
|
573
|
+
# The label to display beside the control.
|
|
574
|
+
label:,
|
|
575
|
+
|
|
576
|
+
# Whether this control requires a nonempty value.
|
|
577
|
+
required:,
|
|
578
|
+
|
|
579
|
+
# The rendering type, such as email, password, or text.
|
|
580
|
+
|
|
581
|
+
type:
|
|
582
|
+
)
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
sig do
|
|
586
|
+
override.returns(
|
|
587
|
+
{id: String, label: String, required: T::Boolean, type: String}
|
|
588
|
+
)
|
|
589
|
+
end
|
|
590
|
+
def to_hash
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
class Option < OpenAI::Internal::Type::BaseModel
|
|
596
|
+
OrHash = T.type_alias do
|
|
597
|
+
T.any(
|
|
598
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::Request::Option,
|
|
599
|
+
OpenAI::Internal::AnyHash
|
|
600
|
+
)
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# The option ID to submit as selected_option.
|
|
604
|
+
sig { returns(String) }
|
|
605
|
+
attr_accessor :id
|
|
606
|
+
|
|
607
|
+
# IDs from the registered fields that this method accepts.
|
|
608
|
+
sig { returns(T::Array[String]) }
|
|
609
|
+
attr_accessor :field_ids
|
|
610
|
+
|
|
611
|
+
# The method label to display.
|
|
612
|
+
sig { returns(String) }
|
|
613
|
+
attr_accessor :label
|
|
614
|
+
|
|
615
|
+
# A sign-in method and the fields that belong to it.
|
|
616
|
+
sig do
|
|
617
|
+
params(
|
|
618
|
+
|
|
619
|
+
id: String,
|
|
620
|
+
|
|
621
|
+
field_ids: T::Array[String],
|
|
622
|
+
|
|
623
|
+
label: String
|
|
624
|
+
)
|
|
625
|
+
.returns(T.attached_class)
|
|
626
|
+
end
|
|
627
|
+
def self.new(
|
|
628
|
+
|
|
629
|
+
# The option ID to submit as selected_option.
|
|
630
|
+
id:,
|
|
631
|
+
|
|
632
|
+
# IDs from the registered fields that this method accepts.
|
|
633
|
+
field_ids:,
|
|
634
|
+
|
|
635
|
+
# The method label to display.
|
|
636
|
+
|
|
637
|
+
label:
|
|
638
|
+
)
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
sig do
|
|
642
|
+
override.returns(
|
|
643
|
+
{id: String, field_ids: T::Array[String], label: String}
|
|
644
|
+
)
|
|
645
|
+
end
|
|
646
|
+
def to_hash
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
end
|
|
650
|
+
end
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
class ComputerUseApprovalRequestResult < OpenAI::Internal::Type::BaseModel
|
|
654
|
+
OrHash = T.type_alias do
|
|
655
|
+
T.any(
|
|
656
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult,
|
|
657
|
+
OpenAI::Internal::AnyHash
|
|
658
|
+
)
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
# The stable history item ID.
|
|
662
|
+
sig { returns(String) }
|
|
663
|
+
attr_accessor :id
|
|
664
|
+
|
|
665
|
+
# The registered request answered by this item.
|
|
666
|
+
sig { returns(String) }
|
|
667
|
+
attr_accessor :request_id
|
|
668
|
+
|
|
669
|
+
# The admitted response, without submitted credential values.
|
|
670
|
+
sig { returns(OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Variants) }
|
|
671
|
+
attr_accessor :response
|
|
672
|
+
|
|
673
|
+
# The ID of the turn that contains this item.
|
|
674
|
+
sig { returns(String) }
|
|
675
|
+
attr_accessor :turn_id
|
|
676
|
+
|
|
677
|
+
sig { returns(Symbol) }
|
|
678
|
+
attr_accessor :type
|
|
679
|
+
|
|
680
|
+
# A credential-free record of an admitted response, not proof of completion.
|
|
681
|
+
sig do
|
|
682
|
+
params(
|
|
683
|
+
|
|
684
|
+
id: String,
|
|
685
|
+
|
|
686
|
+
request_id: String,
|
|
687
|
+
|
|
688
|
+
response: T.any(
|
|
689
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Submit::OrHash,
|
|
690
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Cancel::OrHash
|
|
691
|
+
),
|
|
692
|
+
|
|
693
|
+
turn_id: String,
|
|
694
|
+
|
|
695
|
+
type: Symbol
|
|
696
|
+
)
|
|
697
|
+
.returns(T.attached_class)
|
|
698
|
+
end
|
|
699
|
+
def self.new(
|
|
700
|
+
|
|
701
|
+
# The stable history item ID.
|
|
702
|
+
id:,
|
|
703
|
+
|
|
704
|
+
# The registered request answered by this item.
|
|
705
|
+
request_id:,
|
|
706
|
+
|
|
707
|
+
# The admitted response, without submitted credential values.
|
|
708
|
+
response:,
|
|
709
|
+
|
|
710
|
+
# The ID of the turn that contains this item.
|
|
711
|
+
turn_id:,
|
|
712
|
+
|
|
713
|
+
type: :computer_use_approval_request_result
|
|
714
|
+
)
|
|
715
|
+
end
|
|
716
|
+
|
|
717
|
+
sig do
|
|
718
|
+
override.returns(
|
|
719
|
+
{
|
|
720
|
+
id: String,
|
|
721
|
+
request_id: String,
|
|
722
|
+
response: OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Variants,
|
|
723
|
+
turn_id: String,
|
|
724
|
+
type: Symbol
|
|
725
|
+
}
|
|
726
|
+
)
|
|
727
|
+
end
|
|
728
|
+
def to_hash
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# The admitted response, without submitted credential values.
|
|
732
|
+
module Response
|
|
733
|
+
extend OpenAI::Internal::Type::Union
|
|
734
|
+
|
|
735
|
+
Variants = T.type_alias {
|
|
736
|
+
T.any(
|
|
737
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Submit,
|
|
738
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Cancel
|
|
739
|
+
)
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
class Submit < OpenAI::Internal::Type::BaseModel
|
|
743
|
+
OrHash = T.type_alias do
|
|
744
|
+
T.any(
|
|
745
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Submit,
|
|
746
|
+
OpenAI::Internal::AnyHash
|
|
747
|
+
)
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
sig { returns(Symbol) }
|
|
751
|
+
attr_accessor :action
|
|
752
|
+
|
|
753
|
+
# The chosen sign-in method, or null when no options were offered.
|
|
754
|
+
sig { returns(T.nilable(String)) }
|
|
755
|
+
attr_accessor :selected_option
|
|
756
|
+
|
|
757
|
+
sig { returns(Symbol) }
|
|
758
|
+
attr_accessor :type
|
|
759
|
+
|
|
760
|
+
sig do
|
|
761
|
+
params(
|
|
762
|
+
|
|
763
|
+
selected_option: T.nilable(String),
|
|
764
|
+
|
|
765
|
+
action: Symbol,
|
|
766
|
+
|
|
767
|
+
type: Symbol
|
|
768
|
+
)
|
|
769
|
+
.returns(T.attached_class)
|
|
770
|
+
end
|
|
771
|
+
def self.new(
|
|
772
|
+
|
|
773
|
+
# The chosen sign-in method, or null when no options were offered.
|
|
774
|
+
selected_option:,
|
|
775
|
+
|
|
776
|
+
action: :submit,
|
|
777
|
+
|
|
778
|
+
type: :browser_authentication
|
|
779
|
+
)
|
|
780
|
+
end
|
|
781
|
+
|
|
782
|
+
sig do
|
|
783
|
+
override.returns(
|
|
784
|
+
{action: Symbol, selected_option: T.nilable(String), type: Symbol}
|
|
785
|
+
)
|
|
786
|
+
end
|
|
787
|
+
def to_hash
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
end
|
|
791
|
+
|
|
792
|
+
class Cancel < OpenAI::Internal::Type::BaseModel
|
|
793
|
+
OrHash = T.type_alias do
|
|
794
|
+
T.any(
|
|
795
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Cancel,
|
|
796
|
+
OpenAI::Internal::AnyHash
|
|
797
|
+
)
|
|
798
|
+
end
|
|
799
|
+
|
|
800
|
+
sig { returns(Symbol) }
|
|
801
|
+
attr_accessor :action
|
|
802
|
+
|
|
803
|
+
sig { returns(Symbol) }
|
|
804
|
+
attr_accessor :type
|
|
805
|
+
|
|
806
|
+
sig do
|
|
807
|
+
params(
|
|
808
|
+
|
|
809
|
+
action: Symbol,
|
|
810
|
+
|
|
811
|
+
type: Symbol
|
|
812
|
+
)
|
|
813
|
+
.returns(T.attached_class)
|
|
814
|
+
end
|
|
815
|
+
def self.new(
|
|
816
|
+
|
|
817
|
+
action: :cancel,
|
|
818
|
+
|
|
819
|
+
type: :browser_authentication
|
|
820
|
+
)
|
|
821
|
+
end
|
|
822
|
+
|
|
823
|
+
sig do
|
|
824
|
+
override.returns(
|
|
825
|
+
{action: Symbol, type: Symbol}
|
|
826
|
+
)
|
|
827
|
+
end
|
|
828
|
+
def to_hash
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
end
|
|
832
|
+
|
|
833
|
+
sig {
|
|
834
|
+
override.returns(
|
|
835
|
+
T::Array[OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::Response::Variants]
|
|
836
|
+
)
|
|
837
|
+
}
|
|
838
|
+
def self.variants
|
|
839
|
+
end
|
|
840
|
+
|
|
841
|
+
end
|
|
842
|
+
end
|
|
843
|
+
|
|
230
844
|
sig { override.returns(T::Array[OpenAI::Beta::AgentSessionItem::Variants]) }
|
|
231
845
|
def self.variants
|
|
232
846
|
end
|
|
@@ -51,6 +51,9 @@ module OpenAI
|
|
|
51
51
|
OpenAI::Beta::AgentSessionItem::FunctionCallOutput::OrHash,
|
|
52
52
|
OpenAI::Beta::AgentSessionItem::AgentMessage::OrHash,
|
|
53
53
|
OpenAI::Beta::AgentMcpCallItem::OrHash,
|
|
54
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseCall::OrHash,
|
|
55
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequest::OrHash,
|
|
56
|
+
OpenAI::Beta::AgentSessionItem::ComputerUseApprovalRequestResult::OrHash,
|
|
54
57
|
OpenAI::Beta::AgentWebSearchCallItem::OrHash,
|
|
55
58
|
OpenAI::Beta::AgentCommandExecutionItem::OrHash,
|
|
56
59
|
OpenAI::Beta::AgentCreateSubagentCallItem::OrHash,
|
|
@@ -49,6 +49,8 @@ module OpenAI
|
|
|
49
49
|
OpenAI::Beta::AgentReasoningItem::OrHash,
|
|
50
50
|
OpenAI::Beta::AgentFunctionCallItem::OrHash,
|
|
51
51
|
OpenAI::Beta::AgentMcpCallItem::OrHash,
|
|
52
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseCall::OrHash,
|
|
53
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::OrHash,
|
|
52
54
|
OpenAI::Beta::AgentWebSearchCallItem::OrHash,
|
|
53
55
|
OpenAI::Beta::AgentCommandExecutionItem::OrHash,
|
|
54
56
|
OpenAI::Beta::AgentCreateSubagentCallItem::OrHash,
|
|
@@ -14,7 +14,8 @@ module OpenAI
|
|
|
14
14
|
OpenAI::Beta::AgentTool::Function,
|
|
15
15
|
OpenAI::Beta::AgentTool::ProgrammaticToolCalling,
|
|
16
16
|
OpenAI::Beta::AgentTool::Mcp,
|
|
17
|
-
OpenAI::Beta::AgentTool::WebSearch
|
|
17
|
+
OpenAI::Beta::AgentTool::WebSearch,
|
|
18
|
+
OpenAI::Beta::AgentTool::ComputerUse
|
|
18
19
|
)
|
|
19
20
|
end
|
|
20
21
|
|
|
@@ -455,6 +456,53 @@ module OpenAI
|
|
|
455
456
|
end
|
|
456
457
|
end
|
|
457
458
|
|
|
459
|
+
class ComputerUse < OpenAI::Internal::Type::BaseModel
|
|
460
|
+
OrHash = T.type_alias do
|
|
461
|
+
T.any(
|
|
462
|
+
OpenAI::Beta::AgentTool::ComputerUse,
|
|
463
|
+
OpenAI::Internal::AnyHash
|
|
464
|
+
)
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# Whether computer tool outputs include screenshots.
|
|
468
|
+
sig { returns(T::Boolean) }
|
|
469
|
+
attr_accessor :include_screenshots
|
|
470
|
+
|
|
471
|
+
# The type of the object. Always `computer_use`.
|
|
472
|
+
sig { returns(Symbol) }
|
|
473
|
+
attr_accessor :type
|
|
474
|
+
|
|
475
|
+
# Browser use in an OpenAI-hosted session.
|
|
476
|
+
sig do
|
|
477
|
+
params(
|
|
478
|
+
|
|
479
|
+
include_screenshots: T::Boolean,
|
|
480
|
+
|
|
481
|
+
type: Symbol
|
|
482
|
+
)
|
|
483
|
+
.returns(T.attached_class)
|
|
484
|
+
end
|
|
485
|
+
def self.new(
|
|
486
|
+
|
|
487
|
+
# Whether computer tool outputs include screenshots.
|
|
488
|
+
include_screenshots:,
|
|
489
|
+
|
|
490
|
+
# The type of the object. Always `computer_use`.
|
|
491
|
+
|
|
492
|
+
type: :computer_use
|
|
493
|
+
)
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
sig do
|
|
497
|
+
override.returns(
|
|
498
|
+
{include_screenshots: T::Boolean, type: Symbol}
|
|
499
|
+
)
|
|
500
|
+
end
|
|
501
|
+
def to_hash
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
end
|
|
505
|
+
|
|
458
506
|
sig { override.returns(T::Array[OpenAI::Beta::AgentTool::Variants]) }
|
|
459
507
|
def self.variants
|
|
460
508
|
end
|