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
|
@@ -55,7 +55,7 @@ module OpenAI
|
|
|
55
55
|
# @!attribute required_actions
|
|
56
56
|
# Actions that must be completed before the session can continue.
|
|
57
57
|
#
|
|
58
|
-
# @return [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection>]
|
|
58
|
+
# @return [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest, OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection>]
|
|
59
59
|
required(
|
|
60
60
|
:required_actions,
|
|
61
61
|
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentSession::RequiredAction] }
|
|
@@ -104,7 +104,7 @@ module OpenAI
|
|
|
104
104
|
# @param metadata [Hash{Symbol=>String}]
|
|
105
105
|
# Custom string key-value pairs attached to the session.
|
|
106
106
|
#
|
|
107
|
-
# @param required_actions [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection>]
|
|
107
|
+
# @param required_actions [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest, OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection>]
|
|
108
108
|
# Actions that must be completed before the session can continue.
|
|
109
109
|
#
|
|
110
110
|
# @param status [Symbol, OpenAI::Models::Beta::AgentSession::Status]
|
|
@@ -174,7 +174,7 @@ module OpenAI
|
|
|
174
174
|
# @!attribute tools
|
|
175
175
|
# Tools available to the agent.
|
|
176
176
|
#
|
|
177
|
-
# @return [Array<OpenAI::Models::Beta::AgentTool::Function, OpenAI::Models::Beta::AgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentTool::Mcp, OpenAI::Models::Beta::AgentTool::WebSearch>]
|
|
177
|
+
# @return [Array<OpenAI::Models::Beta::AgentTool::Function, OpenAI::Models::Beta::AgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentTool::Mcp, OpenAI::Models::Beta::AgentTool::WebSearch, OpenAI::Models::Beta::AgentTool::ComputerUse>]
|
|
178
178
|
required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentTool] }
|
|
179
179
|
|
|
180
180
|
# @!method initialize(id:, instructions:, model:, multi_agent:, name:, reasoning:, service_tier:, text:, tools:)
|
|
@@ -205,7 +205,7 @@ module OpenAI
|
|
|
205
205
|
# @param text [OpenAI::Models::Beta::AgentText]
|
|
206
206
|
# Configuration for text generated by the agent.
|
|
207
207
|
#
|
|
208
|
-
# @param tools [Array<OpenAI::Models::Beta::AgentTool::Function, OpenAI::Models::Beta::AgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentTool::Mcp, OpenAI::Models::Beta::AgentTool::WebSearch>]
|
|
208
|
+
# @param tools [Array<OpenAI::Models::Beta::AgentTool::Function, OpenAI::Models::Beta::AgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentTool::Mcp, OpenAI::Models::Beta::AgentTool::WebSearch, OpenAI::Models::Beta::AgentTool::ComputerUse>]
|
|
209
209
|
# Tools available to the agent.
|
|
210
210
|
|
|
211
211
|
# The effective service-tier policy for model requests. Defaults to `auto`.
|
|
@@ -232,12 +232,258 @@ module OpenAI
|
|
|
232
232
|
|
|
233
233
|
discriminator :type
|
|
234
234
|
|
|
235
|
+
# Respond to a computer-use request.
|
|
236
|
+
variant(
|
|
237
|
+
:computer_use_approval_request,
|
|
238
|
+
-> { OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest }
|
|
239
|
+
)
|
|
240
|
+
|
|
235
241
|
# Run a function tool and submit its result.
|
|
236
242
|
variant :function_call, -> { OpenAI::Beta::AgentSession::RequiredAction::FunctionCall }
|
|
237
243
|
|
|
238
244
|
# Reconnect a session environment.
|
|
239
245
|
variant :environment_connection, -> { OpenAI::Beta::AgentSession::RequiredAction::EnvironmentConnection }
|
|
240
246
|
|
|
247
|
+
class ComputerUseApprovalRequest < OpenAI::Internal::Type::BaseModel
|
|
248
|
+
# @!attribute request
|
|
249
|
+
# The information needed to render the request.
|
|
250
|
+
#
|
|
251
|
+
# @return [OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication, OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserOriginAccess]
|
|
252
|
+
required(
|
|
253
|
+
:request,
|
|
254
|
+
union: -> { OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request }
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
# @!attribute request_id
|
|
258
|
+
# The registered request ID to echo when responding.
|
|
259
|
+
#
|
|
260
|
+
# @return [String]
|
|
261
|
+
required :request_id, String
|
|
262
|
+
|
|
263
|
+
# @!attribute turn_id
|
|
264
|
+
# The turn that requested approval.
|
|
265
|
+
#
|
|
266
|
+
# @return [String]
|
|
267
|
+
required :turn_id, String
|
|
268
|
+
|
|
269
|
+
# @!attribute type
|
|
270
|
+
# The type of the object. Always `computer_use_approval_request`.
|
|
271
|
+
#
|
|
272
|
+
# @return [Symbol, :computer_use_approval_request]
|
|
273
|
+
required :type, const: :computer_use_approval_request
|
|
274
|
+
|
|
275
|
+
# @!method initialize(request:, request_id:, turn_id:, type: :computer_use_approval_request)
|
|
276
|
+
# Respond to a computer-use request.
|
|
277
|
+
#
|
|
278
|
+
# @param request [OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication, OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserOriginAccess]
|
|
279
|
+
# The information needed to render the request.
|
|
280
|
+
#
|
|
281
|
+
# @param request_id [String]
|
|
282
|
+
# The registered request ID to echo when responding.
|
|
283
|
+
#
|
|
284
|
+
# @param turn_id [String]
|
|
285
|
+
# The turn that requested approval.
|
|
286
|
+
#
|
|
287
|
+
# @param type [Symbol, :computer_use_approval_request]
|
|
288
|
+
# The type of the object. Always `computer_use_approval_request`.
|
|
289
|
+
|
|
290
|
+
# The information needed to render the request.
|
|
291
|
+
#
|
|
292
|
+
# @see OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest#request
|
|
293
|
+
module Request
|
|
294
|
+
extend OpenAI::Internal::Type::Union
|
|
295
|
+
|
|
296
|
+
discriminator :type
|
|
297
|
+
|
|
298
|
+
# A registered form awaiting the application's response.
|
|
299
|
+
variant(
|
|
300
|
+
:browser_authentication,
|
|
301
|
+
-> {
|
|
302
|
+
OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication
|
|
303
|
+
}
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
# A browser origin awaiting the application's approval decision.
|
|
307
|
+
variant(
|
|
308
|
+
:browser_origin_access,
|
|
309
|
+
-> {
|
|
310
|
+
OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserOriginAccess
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
class BrowserAuthentication < OpenAI::Internal::Type::BaseModel
|
|
315
|
+
# @!attribute credential_origin
|
|
316
|
+
# The registered form or frame origin where values will be entered.
|
|
317
|
+
#
|
|
318
|
+
# @return [String, nil]
|
|
319
|
+
required :credential_origin, String, nil?: true
|
|
320
|
+
|
|
321
|
+
# @!attribute fields
|
|
322
|
+
# Controls to render. All submitted values are sensitive.
|
|
323
|
+
#
|
|
324
|
+
# @return [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field>]
|
|
325
|
+
required(
|
|
326
|
+
:fields,
|
|
327
|
+
-> do
|
|
328
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
329
|
+
OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field
|
|
330
|
+
]
|
|
331
|
+
end
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
# @!attribute options
|
|
335
|
+
# Sign-in methods. Empty for a plain form.
|
|
336
|
+
#
|
|
337
|
+
# @return [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option>]
|
|
338
|
+
required(
|
|
339
|
+
:options,
|
|
340
|
+
-> do
|
|
341
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
342
|
+
OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option
|
|
343
|
+
]
|
|
344
|
+
end
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
# @!attribute reason
|
|
348
|
+
# Why the agent needs the user to sign in.
|
|
349
|
+
#
|
|
350
|
+
# @return [String, nil]
|
|
351
|
+
required :reason, String, nil?: true
|
|
352
|
+
|
|
353
|
+
# @!attribute type
|
|
354
|
+
# The type of the object. Always `browser_authentication`.
|
|
355
|
+
#
|
|
356
|
+
# @return [Symbol, :browser_authentication]
|
|
357
|
+
required :type, const: :browser_authentication
|
|
358
|
+
|
|
359
|
+
# @!method initialize(credential_origin:, fields:, options:, reason:, type: :browser_authentication)
|
|
360
|
+
# A registered form awaiting the application's response.
|
|
361
|
+
#
|
|
362
|
+
# @param credential_origin [String, nil]
|
|
363
|
+
# The registered form or frame origin where values will be entered.
|
|
364
|
+
#
|
|
365
|
+
# @param fields [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field>]
|
|
366
|
+
# Controls to render. All submitted values are sensitive.
|
|
367
|
+
#
|
|
368
|
+
# @param options [Array<OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option>]
|
|
369
|
+
# Sign-in methods. Empty for a plain form.
|
|
370
|
+
#
|
|
371
|
+
# @param reason [String, nil]
|
|
372
|
+
# Why the agent needs the user to sign in.
|
|
373
|
+
#
|
|
374
|
+
# @param type [Symbol, :browser_authentication]
|
|
375
|
+
# The type of the object. Always `browser_authentication`.
|
|
376
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
377
|
+
# @!attribute id
|
|
378
|
+
# The field ID to submit as field_id in a fields entry.
|
|
379
|
+
#
|
|
380
|
+
# @return [String]
|
|
381
|
+
required :id, String
|
|
382
|
+
|
|
383
|
+
# @!attribute label
|
|
384
|
+
# The label to display beside the control.
|
|
385
|
+
#
|
|
386
|
+
# @return [String]
|
|
387
|
+
required :label, String
|
|
388
|
+
|
|
389
|
+
# @!attribute required
|
|
390
|
+
# Whether this control requires a nonempty value.
|
|
391
|
+
#
|
|
392
|
+
# @return [Boolean]
|
|
393
|
+
required :required, OpenAI::Internal::Type::Boolean
|
|
394
|
+
|
|
395
|
+
# @!attribute type
|
|
396
|
+
# The rendering type, such as email, password, or text.
|
|
397
|
+
#
|
|
398
|
+
# @return [String]
|
|
399
|
+
required :type, String
|
|
400
|
+
|
|
401
|
+
# @!method initialize(id:, label:, required:, type:)
|
|
402
|
+
# A control in a registered browser-login form.
|
|
403
|
+
#
|
|
404
|
+
# @param id [String]
|
|
405
|
+
# The field ID to submit as field_id in a fields entry.
|
|
406
|
+
#
|
|
407
|
+
# @param label [String]
|
|
408
|
+
# The label to display beside the control.
|
|
409
|
+
#
|
|
410
|
+
# @param required [Boolean]
|
|
411
|
+
# Whether this control requires a nonempty value.
|
|
412
|
+
#
|
|
413
|
+
# @param type [String]
|
|
414
|
+
# The rendering type, such as email, password, or text.
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
class Option < OpenAI::Internal::Type::BaseModel
|
|
418
|
+
# @!attribute id
|
|
419
|
+
# The option ID to submit as selected_option.
|
|
420
|
+
#
|
|
421
|
+
# @return [String]
|
|
422
|
+
required :id, String
|
|
423
|
+
|
|
424
|
+
# @!attribute field_ids
|
|
425
|
+
# IDs from the registered fields that this method accepts.
|
|
426
|
+
#
|
|
427
|
+
# @return [Array<String>]
|
|
428
|
+
required :field_ids, OpenAI::Internal::Type::ArrayOf[String]
|
|
429
|
+
|
|
430
|
+
# @!attribute label
|
|
431
|
+
# The method label to display.
|
|
432
|
+
#
|
|
433
|
+
# @return [String]
|
|
434
|
+
required :label, String
|
|
435
|
+
|
|
436
|
+
# @!method initialize(id:, field_ids:, label:)
|
|
437
|
+
# A sign-in method and the fields that belong to it.
|
|
438
|
+
#
|
|
439
|
+
# @param id [String]
|
|
440
|
+
# The option ID to submit as selected_option.
|
|
441
|
+
#
|
|
442
|
+
# @param field_ids [Array<String>]
|
|
443
|
+
# IDs from the registered fields that this method accepts.
|
|
444
|
+
#
|
|
445
|
+
# @param label [String]
|
|
446
|
+
# The method label to display.
|
|
447
|
+
end
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
class BrowserOriginAccess < OpenAI::Internal::Type::BaseModel
|
|
451
|
+
# @!attribute origin
|
|
452
|
+
# The origin the browser needs permission to access.
|
|
453
|
+
#
|
|
454
|
+
# @return [String]
|
|
455
|
+
required :origin, String
|
|
456
|
+
|
|
457
|
+
# @!attribute reason
|
|
458
|
+
# The browser's explanation for this request, or null when unavailable.
|
|
459
|
+
#
|
|
460
|
+
# @return [String, nil]
|
|
461
|
+
required :reason, String, nil?: true
|
|
462
|
+
|
|
463
|
+
# @!attribute type
|
|
464
|
+
# The type of the object. Always `browser_origin_access`.
|
|
465
|
+
#
|
|
466
|
+
# @return [Symbol, :browser_origin_access]
|
|
467
|
+
required :type, const: :browser_origin_access
|
|
468
|
+
|
|
469
|
+
# @!method initialize(origin:, reason:, type: :browser_origin_access)
|
|
470
|
+
# A browser origin awaiting the application's approval decision.
|
|
471
|
+
#
|
|
472
|
+
# @param origin [String]
|
|
473
|
+
# The origin the browser needs permission to access.
|
|
474
|
+
#
|
|
475
|
+
# @param reason [String, nil]
|
|
476
|
+
# The browser's explanation for this request, or null when unavailable.
|
|
477
|
+
#
|
|
478
|
+
# @param type [Symbol, :browser_origin_access]
|
|
479
|
+
# The type of the object. Always `browser_origin_access`.
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
# @!method self.variants
|
|
483
|
+
# @return [Array(OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication, OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserOriginAccess)]
|
|
484
|
+
end
|
|
485
|
+
end
|
|
486
|
+
|
|
241
487
|
class FunctionCall < OpenAI::Internal::Type::BaseModel
|
|
242
488
|
# @!attribute arguments
|
|
243
489
|
# The arguments supplied by the model.
|
|
@@ -312,7 +558,7 @@ module OpenAI
|
|
|
312
558
|
end
|
|
313
559
|
|
|
314
560
|
# @!method self.variants
|
|
315
|
-
# @return [Array(OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection)]
|
|
561
|
+
# @return [Array(OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest, OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection)]
|
|
316
562
|
end
|
|
317
563
|
|
|
318
564
|
# The current status of the session.
|
|
@@ -9,6 +9,12 @@ module OpenAI
|
|
|
9
9
|
|
|
10
10
|
discriminator :type
|
|
11
11
|
|
|
12
|
+
# Responds to a pending Computer Use approval request.
|
|
13
|
+
variant(
|
|
14
|
+
:"agent.session.input.computer_use_approval_request_result",
|
|
15
|
+
-> { OpenAI::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult }
|
|
16
|
+
)
|
|
17
|
+
|
|
12
18
|
# Adds one or more user messages and starts a turn.
|
|
13
19
|
variant(
|
|
14
20
|
:"agent.session.input.message",
|
|
@@ -27,6 +33,63 @@ module OpenAI
|
|
|
27
33
|
-> { OpenAI::Beta::AgentSessionInputParam::AgentSessionInputToolResult }
|
|
28
34
|
)
|
|
29
35
|
|
|
36
|
+
class AgentSessionInputComputerUseApprovalRequestResult < OpenAI::Internal::Type::BaseModel
|
|
37
|
+
# @!attribute request_id
|
|
38
|
+
# The registered request ID from the required action.
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :request_id, String
|
|
42
|
+
|
|
43
|
+
# @!attribute response
|
|
44
|
+
# The response for this request type.
|
|
45
|
+
#
|
|
46
|
+
# @return [OpenAI::Models::Beta::AgentBrowserAuthenticationSubmitParam, OpenAI::Models::Beta::AgentBrowserAuthenticationCancelParam, OpenAI::Models::Beta::AgentBrowserOriginAccessParam]
|
|
47
|
+
required(
|
|
48
|
+
:response,
|
|
49
|
+
union: -> {
|
|
50
|
+
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::Response
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
# @!attribute type
|
|
55
|
+
# The type of the object. Always
|
|
56
|
+
# `agent.session.input.computer_use_approval_request_result`.
|
|
57
|
+
#
|
|
58
|
+
# @return [Symbol, :"agent.session.input.computer_use_approval_request_result"]
|
|
59
|
+
required :type, const: :"agent.session.input.computer_use_approval_request_result"
|
|
60
|
+
|
|
61
|
+
# @!method initialize(request_id:, response:, type: :"agent.session.input.computer_use_approval_request_result")
|
|
62
|
+
# Responds to a pending Computer Use approval request.
|
|
63
|
+
#
|
|
64
|
+
# @param request_id [String]
|
|
65
|
+
# The registered request ID from the required action.
|
|
66
|
+
#
|
|
67
|
+
# @param response [OpenAI::Models::Beta::AgentBrowserAuthenticationSubmitParam, OpenAI::Models::Beta::AgentBrowserAuthenticationCancelParam, OpenAI::Models::Beta::AgentBrowserOriginAccessParam]
|
|
68
|
+
# The response for this request type.
|
|
69
|
+
#
|
|
70
|
+
# @param type [Symbol, :"agent.session.input.computer_use_approval_request_result"]
|
|
71
|
+
# The type of the object. Always
|
|
72
|
+
# `agent.session.input.computer_use_approval_request_result`.
|
|
73
|
+
|
|
74
|
+
# The response for this request type.
|
|
75
|
+
#
|
|
76
|
+
# @see OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult#response
|
|
77
|
+
module Response
|
|
78
|
+
extend OpenAI::Internal::Type::Union
|
|
79
|
+
|
|
80
|
+
discriminator :type
|
|
81
|
+
|
|
82
|
+
variant :browser_authentication, -> { OpenAI::Beta::AgentBrowserAuthenticationSubmitParam }
|
|
83
|
+
|
|
84
|
+
variant :browser_authentication, -> { OpenAI::Beta::AgentBrowserAuthenticationCancelParam }
|
|
85
|
+
|
|
86
|
+
variant :browser_origin_access, -> { OpenAI::Beta::AgentBrowserOriginAccessParam }
|
|
87
|
+
|
|
88
|
+
# @!method self.variants
|
|
89
|
+
# @return [Array(OpenAI::Models::Beta::AgentBrowserAuthenticationSubmitParam, OpenAI::Models::Beta::AgentBrowserAuthenticationCancelParam, OpenAI::Models::Beta::AgentBrowserOriginAccessParam)]
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
30
93
|
class AgentSessionInputMessage < OpenAI::Internal::Type::BaseModel
|
|
31
94
|
# @!attribute input
|
|
32
95
|
# The user messages to add to the session.
|
|
@@ -124,7 +187,7 @@ module OpenAI
|
|
|
124
187
|
end
|
|
125
188
|
|
|
126
189
|
# @!method self.variants
|
|
127
|
-
# @return [Array(OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult)]
|
|
190
|
+
# @return [Array(OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult)]
|
|
128
191
|
end
|
|
129
192
|
end
|
|
130
193
|
end
|