openai 0.115.1 → 0.116.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 +19 -0
- data/README.md +1 -1
- data/lib/openai/helpers/responses_websocket/incremental.rb +500 -154
- data/lib/openai/helpers/responses_websocket/session.rb +75 -2
- data/lib/openai/models/live/responses_delegation_config.rb +999 -6
- data/lib/openai/models/live/responses_delegation_update_config.rb +1043 -6
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/helpers/responses_websocket/incremental.rbi +4 -0
- data/rbi/openai/models/live/responses_delegation_config.rbi +2253 -24
- data/rbi/openai/models/live/responses_delegation_update_config.rbi +2327 -24
- data/responses-websocket.md +40 -2
- data/sig/openai/helpers/responses_websocket/incremental.rbs +1 -0
- data/sig/openai/models/live/responses_delegation_config.rbs +851 -0
- data/sig/openai/models/live/responses_delegation_update_config.rbs +871 -0
- metadata +1 -1
|
@@ -53,14 +53,14 @@ module OpenAI
|
|
|
53
53
|
# Controls which tool the Responses backend uses when handling a task delegated by
|
|
54
54
|
# the Live model.
|
|
55
55
|
#
|
|
56
|
-
# @return [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveToolChoiceEnum, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveFunctionToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam, nil]
|
|
56
|
+
# @return [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveToolChoiceEnum, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveFunctionToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearchPreview, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ApplyPatch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam, nil]
|
|
57
57
|
optional :tool_choice, union: -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice }
|
|
58
58
|
|
|
59
59
|
# @!attribute tools
|
|
60
60
|
# Tools available to the Responses backend while it handles tasks delegated by the
|
|
61
61
|
# Live model.
|
|
62
62
|
#
|
|
63
|
-
# @return [Array<OpenAI::Models::Live::FunctionTool, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::WebSearch>, nil]
|
|
63
|
+
# @return [Array<OpenAI::Models::Live::FunctionTool, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Mcp, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Namespace, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ToolSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ApplyPatch>, nil]
|
|
64
64
|
optional(
|
|
65
65
|
:tools,
|
|
66
66
|
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::ResponsesDelegationConfig::Tool] }
|
|
@@ -94,11 +94,11 @@ module OpenAI
|
|
|
94
94
|
# @param text [OpenAI::Models::Live::ResponsesDelegationConfig::Text, nil]
|
|
95
95
|
# Text generation settings passed to each delegated Responses request.
|
|
96
96
|
#
|
|
97
|
-
# @param tool_choice [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveToolChoiceEnum, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveFunctionToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam]
|
|
97
|
+
# @param tool_choice [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveToolChoiceEnum, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveFunctionToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearchPreview, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ApplyPatch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam]
|
|
98
98
|
# Controls which tool the Responses backend uses when handling a task delegated by
|
|
99
99
|
# the Live model.
|
|
100
100
|
#
|
|
101
|
-
# @param tools [Array<OpenAI::Models::Live::FunctionTool, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::WebSearch>]
|
|
101
|
+
# @param tools [Array<OpenAI::Models::Live::FunctionTool, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Mcp, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Namespace, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ToolSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ApplyPatch>]
|
|
102
102
|
# Tools available to the Responses backend while it handles tasks delegated by the
|
|
103
103
|
# Live model.
|
|
104
104
|
|
|
@@ -243,6 +243,30 @@ module OpenAI
|
|
|
243
243
|
|
|
244
244
|
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam }
|
|
245
245
|
|
|
246
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::FileSearch }
|
|
247
|
+
|
|
248
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::WebSearch }
|
|
249
|
+
|
|
250
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::WebSearchPreview }
|
|
251
|
+
|
|
252
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::ImageGeneration }
|
|
253
|
+
|
|
254
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::Computer }
|
|
255
|
+
|
|
256
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::CodeInterpreter }
|
|
257
|
+
|
|
258
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::ProgrammaticToolCalling }
|
|
259
|
+
|
|
260
|
+
# Forces the model to call the shell tool when a tool call is required.
|
|
261
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::Shell }
|
|
262
|
+
|
|
263
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::Custom }
|
|
264
|
+
|
|
265
|
+
# Forces the model to call the apply_patch tool when executing a tool call.
|
|
266
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::ApplyPatch }
|
|
267
|
+
|
|
268
|
+
variant -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam }
|
|
269
|
+
|
|
246
270
|
module LiveToolChoiceEnum
|
|
247
271
|
extend OpenAI::Internal::Type::Enum
|
|
248
272
|
|
|
@@ -292,8 +316,455 @@ module OpenAI
|
|
|
292
316
|
# @param type [Symbol, :mcp]
|
|
293
317
|
end
|
|
294
318
|
|
|
319
|
+
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
320
|
+
# @!attribute type
|
|
321
|
+
# The tool to call. Always `file_search`.
|
|
322
|
+
#
|
|
323
|
+
# @return [Symbol, :file_search]
|
|
324
|
+
required :type, const: :file_search
|
|
325
|
+
|
|
326
|
+
# @!method initialize(type: :file_search)
|
|
327
|
+
# @param type [Symbol, :file_search]
|
|
328
|
+
# The tool to call. Always `file_search`.
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
class WebSearch < OpenAI::Internal::Type::BaseModel
|
|
332
|
+
# @!attribute type
|
|
333
|
+
# The tool to call. Always `web_search`.
|
|
334
|
+
#
|
|
335
|
+
# @return [Symbol, :web_search]
|
|
336
|
+
required :type, const: :web_search
|
|
337
|
+
|
|
338
|
+
# @!method initialize(type: :web_search)
|
|
339
|
+
# @param type [Symbol, :web_search]
|
|
340
|
+
# The tool to call. Always `web_search`.
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
class WebSearchPreview < OpenAI::Internal::Type::BaseModel
|
|
344
|
+
# @!attribute type
|
|
345
|
+
# The tool to call. Always `web_search_preview`.
|
|
346
|
+
#
|
|
347
|
+
# @return [Symbol, :web_search_preview]
|
|
348
|
+
required :type, const: :web_search_preview
|
|
349
|
+
|
|
350
|
+
# @!method initialize(type: :web_search_preview)
|
|
351
|
+
# @param type [Symbol, :web_search_preview]
|
|
352
|
+
# The tool to call. Always `web_search_preview`.
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
class ImageGeneration < OpenAI::Internal::Type::BaseModel
|
|
356
|
+
# @!attribute type
|
|
357
|
+
# The tool to call. Always `image_generation`.
|
|
358
|
+
#
|
|
359
|
+
# @return [Symbol, :image_generation]
|
|
360
|
+
required :type, const: :image_generation
|
|
361
|
+
|
|
362
|
+
# @!method initialize(type: :image_generation)
|
|
363
|
+
# @param type [Symbol, :image_generation]
|
|
364
|
+
# The tool to call. Always `image_generation`.
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
class Computer < OpenAI::Internal::Type::BaseModel
|
|
368
|
+
# @!attribute type
|
|
369
|
+
# The tool to call. Always `computer`.
|
|
370
|
+
#
|
|
371
|
+
# @return [Symbol, :computer]
|
|
372
|
+
required :type, const: :computer
|
|
373
|
+
|
|
374
|
+
# @!method initialize(type: :computer)
|
|
375
|
+
# @param type [Symbol, :computer]
|
|
376
|
+
# The tool to call. Always `computer`.
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
380
|
+
# @!attribute type
|
|
381
|
+
# The tool to call. Always `code_interpreter`.
|
|
382
|
+
#
|
|
383
|
+
# @return [Symbol, :code_interpreter]
|
|
384
|
+
required :type, const: :code_interpreter
|
|
385
|
+
|
|
386
|
+
# @!method initialize(type: :code_interpreter)
|
|
387
|
+
# @param type [Symbol, :code_interpreter]
|
|
388
|
+
# The tool to call. Always `code_interpreter`.
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
|
|
392
|
+
# @!attribute type
|
|
393
|
+
# The tool to call. Always `programmatic_tool_calling`.
|
|
394
|
+
#
|
|
395
|
+
# @return [Symbol, :programmatic_tool_calling]
|
|
396
|
+
required :type, const: :programmatic_tool_calling
|
|
397
|
+
|
|
398
|
+
# @!method initialize(type: :programmatic_tool_calling)
|
|
399
|
+
# @param type [Symbol, :programmatic_tool_calling]
|
|
400
|
+
# The tool to call. Always `programmatic_tool_calling`.
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
class Shell < OpenAI::Internal::Type::BaseModel
|
|
404
|
+
# @!attribute type
|
|
405
|
+
# The tool to call. Always `shell`.
|
|
406
|
+
#
|
|
407
|
+
# @return [Symbol, :shell]
|
|
408
|
+
required :type, const: :shell
|
|
409
|
+
|
|
410
|
+
# @!method initialize(type: :shell)
|
|
411
|
+
# Forces the model to call the shell tool when a tool call is required.
|
|
412
|
+
#
|
|
413
|
+
# @param type [Symbol, :shell]
|
|
414
|
+
# The tool to call. Always `shell`.
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
class Custom < OpenAI::Internal::Type::BaseModel
|
|
418
|
+
# @!attribute name
|
|
419
|
+
# The name of the custom tool to call.
|
|
420
|
+
#
|
|
421
|
+
# @return [String]
|
|
422
|
+
required :name, String
|
|
423
|
+
|
|
424
|
+
# @!attribute type
|
|
425
|
+
# The tool to call. Always `custom`.
|
|
426
|
+
#
|
|
427
|
+
# @return [Symbol, :custom]
|
|
428
|
+
required :type, const: :custom
|
|
429
|
+
|
|
430
|
+
# @!method initialize(name:, type: :custom)
|
|
431
|
+
# @param name [String]
|
|
432
|
+
# The name of the custom tool to call.
|
|
433
|
+
#
|
|
434
|
+
# @param type [Symbol, :custom]
|
|
435
|
+
# The tool to call. Always `custom`.
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
class ApplyPatch < OpenAI::Internal::Type::BaseModel
|
|
439
|
+
# @!attribute type
|
|
440
|
+
# The tool to call. Always `apply_patch`.
|
|
441
|
+
#
|
|
442
|
+
# @return [Symbol, :apply_patch]
|
|
443
|
+
required :type, const: :apply_patch
|
|
444
|
+
|
|
445
|
+
# @!method initialize(type: :apply_patch)
|
|
446
|
+
# Forces the model to call the apply_patch tool when executing a tool call.
|
|
447
|
+
#
|
|
448
|
+
# @param type [Symbol, :apply_patch]
|
|
449
|
+
# The tool to call. Always `apply_patch`.
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
class LiveAllowedToolsChoiceParam < OpenAI::Internal::Type::BaseModel
|
|
453
|
+
# @!attribute tools
|
|
454
|
+
# The tools that the delegated Responses model may call.
|
|
455
|
+
#
|
|
456
|
+
# @return [Array<OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch>]
|
|
457
|
+
required(
|
|
458
|
+
:tools,
|
|
459
|
+
-> {
|
|
460
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
461
|
+
union: OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool
|
|
462
|
+
]
|
|
463
|
+
}
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
# @!attribute type
|
|
467
|
+
# The tool choice type. Always `allowed_tools`.
|
|
468
|
+
#
|
|
469
|
+
# @return [Symbol, :allowed_tools]
|
|
470
|
+
required :type, const: :allowed_tools
|
|
471
|
+
|
|
472
|
+
# @!attribute mode
|
|
473
|
+
# How to select a tool from the allowed set.
|
|
474
|
+
#
|
|
475
|
+
# @return [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode, nil]
|
|
476
|
+
optional(
|
|
477
|
+
:mode,
|
|
478
|
+
enum: -> {
|
|
479
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode
|
|
480
|
+
},
|
|
481
|
+
nil?: true
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
# @!method initialize(tools:, mode: nil, type: :allowed_tools)
|
|
485
|
+
# @param tools [Array<OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch>]
|
|
486
|
+
# The tools that the delegated Responses model may call.
|
|
487
|
+
#
|
|
488
|
+
# @param mode [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode, nil]
|
|
489
|
+
# How to select a tool from the allowed set.
|
|
490
|
+
#
|
|
491
|
+
# @param type [Symbol, :allowed_tools]
|
|
492
|
+
# The tool choice type. Always `allowed_tools`.
|
|
493
|
+
|
|
494
|
+
# Forces the model to call the shell tool when a tool call is required.
|
|
495
|
+
module Tool
|
|
496
|
+
extend OpenAI::Internal::Type::Union
|
|
497
|
+
|
|
498
|
+
discriminator :type
|
|
499
|
+
|
|
500
|
+
variant(
|
|
501
|
+
:function,
|
|
502
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function }
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
variant(
|
|
506
|
+
:mcp,
|
|
507
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp }
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
variant(
|
|
511
|
+
:file_search,
|
|
512
|
+
-> {
|
|
513
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch
|
|
514
|
+
}
|
|
515
|
+
)
|
|
516
|
+
|
|
517
|
+
variant(
|
|
518
|
+
:web_search,
|
|
519
|
+
-> {
|
|
520
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch
|
|
521
|
+
}
|
|
522
|
+
)
|
|
523
|
+
|
|
524
|
+
variant(
|
|
525
|
+
:web_search_preview,
|
|
526
|
+
-> {
|
|
527
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview
|
|
528
|
+
}
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
variant(
|
|
532
|
+
:image_generation,
|
|
533
|
+
-> {
|
|
534
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration
|
|
535
|
+
}
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
variant(
|
|
539
|
+
:computer,
|
|
540
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer }
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
variant(
|
|
544
|
+
:code_interpreter,
|
|
545
|
+
-> {
|
|
546
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter
|
|
547
|
+
}
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
variant(
|
|
551
|
+
:programmatic_tool_calling,
|
|
552
|
+
-> {
|
|
553
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
|
|
557
|
+
# Forces the model to call the shell tool when a tool call is required.
|
|
558
|
+
variant(
|
|
559
|
+
:shell,
|
|
560
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell }
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
variant(
|
|
564
|
+
:custom,
|
|
565
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom }
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
# Forces the model to call the apply_patch tool when executing a tool call.
|
|
569
|
+
variant(
|
|
570
|
+
:apply_patch,
|
|
571
|
+
-> {
|
|
572
|
+
OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch
|
|
573
|
+
}
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
class Function < OpenAI::Internal::Type::BaseModel
|
|
577
|
+
# @!attribute name
|
|
578
|
+
#
|
|
579
|
+
# @return [String]
|
|
580
|
+
required :name, String
|
|
581
|
+
|
|
582
|
+
# @!attribute type
|
|
583
|
+
#
|
|
584
|
+
# @return [Symbol, :function]
|
|
585
|
+
required :type, const: :function
|
|
586
|
+
|
|
587
|
+
# @!method initialize(name:, type: :function)
|
|
588
|
+
# @param name [String]
|
|
589
|
+
# @param type [Symbol, :function]
|
|
590
|
+
end
|
|
591
|
+
|
|
592
|
+
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
593
|
+
# @!attribute name
|
|
594
|
+
#
|
|
595
|
+
# @return [String]
|
|
596
|
+
required :name, String
|
|
597
|
+
|
|
598
|
+
# @!attribute server_label
|
|
599
|
+
#
|
|
600
|
+
# @return [String]
|
|
601
|
+
required :server_label, String
|
|
602
|
+
|
|
603
|
+
# @!attribute type
|
|
604
|
+
#
|
|
605
|
+
# @return [Symbol, :mcp]
|
|
606
|
+
required :type, const: :mcp
|
|
607
|
+
|
|
608
|
+
# @!method initialize(name:, server_label:, type: :mcp)
|
|
609
|
+
# @param name [String]
|
|
610
|
+
# @param server_label [String]
|
|
611
|
+
# @param type [Symbol, :mcp]
|
|
612
|
+
end
|
|
613
|
+
|
|
614
|
+
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
615
|
+
# @!attribute type
|
|
616
|
+
# The tool to call. Always `file_search`.
|
|
617
|
+
#
|
|
618
|
+
# @return [Symbol, :file_search]
|
|
619
|
+
required :type, const: :file_search
|
|
620
|
+
|
|
621
|
+
# @!method initialize(type: :file_search)
|
|
622
|
+
# @param type [Symbol, :file_search]
|
|
623
|
+
# The tool to call. Always `file_search`.
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
class WebSearch < OpenAI::Internal::Type::BaseModel
|
|
627
|
+
# @!attribute type
|
|
628
|
+
# The tool to call. Always `web_search`.
|
|
629
|
+
#
|
|
630
|
+
# @return [Symbol, :web_search]
|
|
631
|
+
required :type, const: :web_search
|
|
632
|
+
|
|
633
|
+
# @!method initialize(type: :web_search)
|
|
634
|
+
# @param type [Symbol, :web_search]
|
|
635
|
+
# The tool to call. Always `web_search`.
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
class WebSearchPreview < OpenAI::Internal::Type::BaseModel
|
|
639
|
+
# @!attribute type
|
|
640
|
+
# The tool to call. Always `web_search_preview`.
|
|
641
|
+
#
|
|
642
|
+
# @return [Symbol, :web_search_preview]
|
|
643
|
+
required :type, const: :web_search_preview
|
|
644
|
+
|
|
645
|
+
# @!method initialize(type: :web_search_preview)
|
|
646
|
+
# @param type [Symbol, :web_search_preview]
|
|
647
|
+
# The tool to call. Always `web_search_preview`.
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
class ImageGeneration < OpenAI::Internal::Type::BaseModel
|
|
651
|
+
# @!attribute type
|
|
652
|
+
# The tool to call. Always `image_generation`.
|
|
653
|
+
#
|
|
654
|
+
# @return [Symbol, :image_generation]
|
|
655
|
+
required :type, const: :image_generation
|
|
656
|
+
|
|
657
|
+
# @!method initialize(type: :image_generation)
|
|
658
|
+
# @param type [Symbol, :image_generation]
|
|
659
|
+
# The tool to call. Always `image_generation`.
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
class Computer < OpenAI::Internal::Type::BaseModel
|
|
663
|
+
# @!attribute type
|
|
664
|
+
# The tool to call. Always `computer`.
|
|
665
|
+
#
|
|
666
|
+
# @return [Symbol, :computer]
|
|
667
|
+
required :type, const: :computer
|
|
668
|
+
|
|
669
|
+
# @!method initialize(type: :computer)
|
|
670
|
+
# @param type [Symbol, :computer]
|
|
671
|
+
# The tool to call. Always `computer`.
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
675
|
+
# @!attribute type
|
|
676
|
+
# The tool to call. Always `code_interpreter`.
|
|
677
|
+
#
|
|
678
|
+
# @return [Symbol, :code_interpreter]
|
|
679
|
+
required :type, const: :code_interpreter
|
|
680
|
+
|
|
681
|
+
# @!method initialize(type: :code_interpreter)
|
|
682
|
+
# @param type [Symbol, :code_interpreter]
|
|
683
|
+
# The tool to call. Always `code_interpreter`.
|
|
684
|
+
end
|
|
685
|
+
|
|
686
|
+
class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
|
|
687
|
+
# @!attribute type
|
|
688
|
+
# The tool to call. Always `programmatic_tool_calling`.
|
|
689
|
+
#
|
|
690
|
+
# @return [Symbol, :programmatic_tool_calling]
|
|
691
|
+
required :type, const: :programmatic_tool_calling
|
|
692
|
+
|
|
693
|
+
# @!method initialize(type: :programmatic_tool_calling)
|
|
694
|
+
# @param type [Symbol, :programmatic_tool_calling]
|
|
695
|
+
# The tool to call. Always `programmatic_tool_calling`.
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
class Shell < OpenAI::Internal::Type::BaseModel
|
|
699
|
+
# @!attribute type
|
|
700
|
+
# The tool to call. Always `shell`.
|
|
701
|
+
#
|
|
702
|
+
# @return [Symbol, :shell]
|
|
703
|
+
required :type, const: :shell
|
|
704
|
+
|
|
705
|
+
# @!method initialize(type: :shell)
|
|
706
|
+
# Forces the model to call the shell tool when a tool call is required.
|
|
707
|
+
#
|
|
708
|
+
# @param type [Symbol, :shell]
|
|
709
|
+
# The tool to call. Always `shell`.
|
|
710
|
+
end
|
|
711
|
+
|
|
712
|
+
class Custom < OpenAI::Internal::Type::BaseModel
|
|
713
|
+
# @!attribute name
|
|
714
|
+
# The name of the custom tool to call.
|
|
715
|
+
#
|
|
716
|
+
# @return [String]
|
|
717
|
+
required :name, String
|
|
718
|
+
|
|
719
|
+
# @!attribute type
|
|
720
|
+
# The tool to call. Always `custom`.
|
|
721
|
+
#
|
|
722
|
+
# @return [Symbol, :custom]
|
|
723
|
+
required :type, const: :custom
|
|
724
|
+
|
|
725
|
+
# @!method initialize(name:, type: :custom)
|
|
726
|
+
# @param name [String]
|
|
727
|
+
# The name of the custom tool to call.
|
|
728
|
+
#
|
|
729
|
+
# @param type [Symbol, :custom]
|
|
730
|
+
# The tool to call. Always `custom`.
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
class ApplyPatch < OpenAI::Internal::Type::BaseModel
|
|
734
|
+
# @!attribute type
|
|
735
|
+
# The tool to call. Always `apply_patch`.
|
|
736
|
+
#
|
|
737
|
+
# @return [Symbol, :apply_patch]
|
|
738
|
+
required :type, const: :apply_patch
|
|
739
|
+
|
|
740
|
+
# @!method initialize(type: :apply_patch)
|
|
741
|
+
# Forces the model to call the apply_patch tool when executing a tool call.
|
|
742
|
+
#
|
|
743
|
+
# @param type [Symbol, :apply_patch]
|
|
744
|
+
# The tool to call. Always `apply_patch`.
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
# @!method self.variants
|
|
748
|
+
# @return [Array(OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch)]
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
# How to select a tool from the allowed set.
|
|
752
|
+
#
|
|
753
|
+
# @see OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam#mode
|
|
754
|
+
module Mode
|
|
755
|
+
extend OpenAI::Internal::Type::Enum
|
|
756
|
+
|
|
757
|
+
NONE = :none
|
|
758
|
+
AUTO = :auto
|
|
759
|
+
REQUIRED = :required
|
|
760
|
+
|
|
761
|
+
# @!method self.values
|
|
762
|
+
# @return [Array<Symbol>]
|
|
763
|
+
end
|
|
764
|
+
end
|
|
765
|
+
|
|
295
766
|
# @!method self.variants
|
|
296
|
-
# @return [Array(Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveToolChoiceEnum, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveFunctionToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam)]
|
|
767
|
+
# @return [Array(Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveToolChoiceEnum, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveFunctionToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearchPreview, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ApplyPatch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam)]
|
|
297
768
|
end
|
|
298
769
|
|
|
299
770
|
# A function tool available to the Responses backend when the Live model delegates
|
|
@@ -309,6 +780,32 @@ module OpenAI
|
|
|
309
780
|
# A web search tool available to the Live session’s Responses backend.
|
|
310
781
|
variant :web_search, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::WebSearch }
|
|
311
782
|
|
|
783
|
+
variant :file_search, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::FileSearch }
|
|
784
|
+
|
|
785
|
+
variant :code_interpreter, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter }
|
|
786
|
+
|
|
787
|
+
# A Responses shell tool. Use a hosted container or return local shell results with response.item.create. Domain secrets are not supported.
|
|
788
|
+
variant :shell, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::Shell }
|
|
789
|
+
|
|
790
|
+
variant :image_generation, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration }
|
|
791
|
+
|
|
792
|
+
variant :mcp, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp }
|
|
793
|
+
|
|
794
|
+
variant :custom, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::Custom }
|
|
795
|
+
|
|
796
|
+
variant :namespace, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace }
|
|
797
|
+
|
|
798
|
+
variant :tool_search, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch }
|
|
799
|
+
|
|
800
|
+
variant(
|
|
801
|
+
:programmatic_tool_calling,
|
|
802
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::Tool::ProgrammaticToolCalling }
|
|
803
|
+
)
|
|
804
|
+
|
|
805
|
+
variant :computer, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::Computer }
|
|
806
|
+
|
|
807
|
+
variant :apply_patch, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::ApplyPatch }
|
|
808
|
+
|
|
312
809
|
class WebSearch < OpenAI::Internal::Type::BaseModel
|
|
313
810
|
# @!attribute type
|
|
314
811
|
# The tool type. Always `web_search`.
|
|
@@ -323,8 +820,504 @@ module OpenAI
|
|
|
323
820
|
# The tool type. Always `web_search`.
|
|
324
821
|
end
|
|
325
822
|
|
|
823
|
+
class FileSearch < OpenAI::Internal::Type::BaseModel
|
|
824
|
+
# @!attribute type
|
|
825
|
+
#
|
|
826
|
+
# @return [Symbol, :file_search]
|
|
827
|
+
required :type, const: :file_search
|
|
828
|
+
|
|
829
|
+
# @!method initialize(type: :file_search)
|
|
830
|
+
# @param type [Symbol, :file_search]
|
|
831
|
+
end
|
|
832
|
+
|
|
833
|
+
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
834
|
+
# @!attribute type
|
|
835
|
+
#
|
|
836
|
+
# @return [Symbol, :code_interpreter]
|
|
837
|
+
required :type, const: :code_interpreter
|
|
838
|
+
|
|
839
|
+
# @!method initialize(type: :code_interpreter)
|
|
840
|
+
# @param type [Symbol, :code_interpreter]
|
|
841
|
+
end
|
|
842
|
+
|
|
843
|
+
class Shell < OpenAI::Internal::Type::BaseModel
|
|
844
|
+
# @!attribute type
|
|
845
|
+
#
|
|
846
|
+
# @return [Symbol, :shell]
|
|
847
|
+
required :type, const: :shell
|
|
848
|
+
|
|
849
|
+
# @!attribute environment
|
|
850
|
+
#
|
|
851
|
+
# @return [OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerReference, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local, nil]
|
|
852
|
+
optional(
|
|
853
|
+
:environment,
|
|
854
|
+
union: -> { OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment },
|
|
855
|
+
nil?: true
|
|
856
|
+
)
|
|
857
|
+
|
|
858
|
+
# @!method initialize(environment: nil, type: :shell)
|
|
859
|
+
# A Responses shell tool. Use a hosted container or return local shell results
|
|
860
|
+
# with response.item.create. Domain secrets are not supported.
|
|
861
|
+
#
|
|
862
|
+
# @param environment [OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerReference, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local, nil]
|
|
863
|
+
# @param type [Symbol, :shell]
|
|
864
|
+
|
|
865
|
+
# @see OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell#environment
|
|
866
|
+
module Environment
|
|
867
|
+
extend OpenAI::Internal::Type::Union
|
|
868
|
+
|
|
869
|
+
discriminator :type
|
|
870
|
+
|
|
871
|
+
variant(
|
|
872
|
+
:container_auto,
|
|
873
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto }
|
|
874
|
+
)
|
|
875
|
+
|
|
876
|
+
variant(
|
|
877
|
+
:container_reference,
|
|
878
|
+
-> { OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerReference }
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
variant :local, -> { OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local }
|
|
882
|
+
|
|
883
|
+
class ContainerAuto < OpenAI::Internal::Type::BaseModel
|
|
884
|
+
# @!attribute type
|
|
885
|
+
# Automatically creates a container for this request
|
|
886
|
+
#
|
|
887
|
+
# @return [Symbol, :container_auto]
|
|
888
|
+
required :type, const: :container_auto
|
|
889
|
+
|
|
890
|
+
# @!attribute file_ids
|
|
891
|
+
# An optional list of uploaded files to make available to your code.
|
|
892
|
+
#
|
|
893
|
+
# @return [Array<String>, nil]
|
|
894
|
+
optional :file_ids, OpenAI::Internal::Type::ArrayOf[String], nil?: true
|
|
895
|
+
|
|
896
|
+
# @!attribute memory_limit
|
|
897
|
+
# The memory limit for the container.
|
|
898
|
+
#
|
|
899
|
+
# @return [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit, nil]
|
|
900
|
+
optional(
|
|
901
|
+
:memory_limit,
|
|
902
|
+
enum: -> {
|
|
903
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit
|
|
904
|
+
},
|
|
905
|
+
nil?: true
|
|
906
|
+
)
|
|
907
|
+
|
|
908
|
+
# @!attribute network_policy
|
|
909
|
+
# Network access policy for the container.
|
|
910
|
+
#
|
|
911
|
+
# @return [OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist, nil]
|
|
912
|
+
optional(
|
|
913
|
+
:network_policy,
|
|
914
|
+
union: -> {
|
|
915
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy
|
|
916
|
+
},
|
|
917
|
+
nil?: true
|
|
918
|
+
)
|
|
919
|
+
|
|
920
|
+
# @!attribute skills
|
|
921
|
+
# An optional list of skills referenced by id or inline data.
|
|
922
|
+
#
|
|
923
|
+
# @return [Array<OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline>, nil]
|
|
924
|
+
optional(
|
|
925
|
+
:skills,
|
|
926
|
+
-> {
|
|
927
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
928
|
+
union: OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
nil?: true
|
|
932
|
+
)
|
|
933
|
+
|
|
934
|
+
# @!method initialize(file_ids: nil, memory_limit: nil, network_policy: nil, skills: nil, type: :container_auto)
|
|
935
|
+
# @param file_ids [Array<String>, nil]
|
|
936
|
+
# An optional list of uploaded files to make available to your code.
|
|
937
|
+
#
|
|
938
|
+
# @param memory_limit [Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit, nil]
|
|
939
|
+
# The memory limit for the container.
|
|
940
|
+
#
|
|
941
|
+
# @param network_policy [OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist, nil]
|
|
942
|
+
# Network access policy for the container.
|
|
943
|
+
#
|
|
944
|
+
# @param skills [Array<OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline>, nil]
|
|
945
|
+
# An optional list of skills referenced by id or inline data.
|
|
946
|
+
#
|
|
947
|
+
# @param type [Symbol, :container_auto]
|
|
948
|
+
# Automatically creates a container for this request
|
|
949
|
+
|
|
950
|
+
# The memory limit for the container.
|
|
951
|
+
#
|
|
952
|
+
# @see OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto#memory_limit
|
|
953
|
+
module MemoryLimit
|
|
954
|
+
extend OpenAI::Internal::Type::Enum
|
|
955
|
+
|
|
956
|
+
MEMORY_LIMIT_1G = :"1g"
|
|
957
|
+
MEMORY_LIMIT_4G = :"4g"
|
|
958
|
+
MEMORY_LIMIT_16G = :"16g"
|
|
959
|
+
MEMORY_LIMIT_64G = :"64g"
|
|
960
|
+
|
|
961
|
+
# @!method self.values
|
|
962
|
+
# @return [Array<Symbol>]
|
|
963
|
+
end
|
|
964
|
+
|
|
965
|
+
# Network access policy for the container.
|
|
966
|
+
#
|
|
967
|
+
# @see OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto#network_policy
|
|
968
|
+
module NetworkPolicy
|
|
969
|
+
extend OpenAI::Internal::Type::Union
|
|
970
|
+
|
|
971
|
+
discriminator :type
|
|
972
|
+
|
|
973
|
+
variant(
|
|
974
|
+
:disabled,
|
|
975
|
+
-> {
|
|
976
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled
|
|
977
|
+
}
|
|
978
|
+
)
|
|
979
|
+
|
|
980
|
+
variant(
|
|
981
|
+
:allowlist,
|
|
982
|
+
-> {
|
|
983
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist
|
|
984
|
+
}
|
|
985
|
+
)
|
|
986
|
+
|
|
987
|
+
class Disabled < OpenAI::Internal::Type::BaseModel
|
|
988
|
+
# @!attribute type
|
|
989
|
+
# Disable outbound network access. Always `disabled`.
|
|
990
|
+
#
|
|
991
|
+
# @return [Symbol, :disabled]
|
|
992
|
+
required :type, const: :disabled
|
|
993
|
+
|
|
994
|
+
# @!method initialize(type: :disabled)
|
|
995
|
+
# @param type [Symbol, :disabled]
|
|
996
|
+
# Disable outbound network access. Always `disabled`.
|
|
997
|
+
end
|
|
998
|
+
|
|
999
|
+
class Allowlist < OpenAI::Internal::Type::BaseModel
|
|
1000
|
+
# @!attribute allowed_domains
|
|
1001
|
+
# A list of allowed domains when type is `allowlist`.
|
|
1002
|
+
#
|
|
1003
|
+
# @return [Array<String>]
|
|
1004
|
+
required :allowed_domains, OpenAI::Internal::Type::ArrayOf[String]
|
|
1005
|
+
|
|
1006
|
+
# @!attribute type
|
|
1007
|
+
# Allow outbound network access only to specified domains. Always `allowlist`.
|
|
1008
|
+
#
|
|
1009
|
+
# @return [Symbol, :allowlist]
|
|
1010
|
+
required :type, const: :allowlist
|
|
1011
|
+
|
|
1012
|
+
# @!method initialize(allowed_domains:, type: :allowlist)
|
|
1013
|
+
# @param allowed_domains [Array<String>]
|
|
1014
|
+
# A list of allowed domains when type is `allowlist`.
|
|
1015
|
+
#
|
|
1016
|
+
# @param type [Symbol, :allowlist]
|
|
1017
|
+
# Allow outbound network access only to specified domains. Always `allowlist`.
|
|
1018
|
+
end
|
|
1019
|
+
|
|
1020
|
+
# @!method self.variants
|
|
1021
|
+
# @return [Array(OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist)]
|
|
1022
|
+
end
|
|
1023
|
+
|
|
1024
|
+
module Skill
|
|
1025
|
+
extend OpenAI::Internal::Type::Union
|
|
1026
|
+
|
|
1027
|
+
discriminator :type
|
|
1028
|
+
|
|
1029
|
+
variant(
|
|
1030
|
+
:skill_reference,
|
|
1031
|
+
-> {
|
|
1032
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference
|
|
1033
|
+
}
|
|
1034
|
+
)
|
|
1035
|
+
|
|
1036
|
+
variant(
|
|
1037
|
+
:inline,
|
|
1038
|
+
-> {
|
|
1039
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline
|
|
1040
|
+
}
|
|
1041
|
+
)
|
|
1042
|
+
|
|
1043
|
+
class SkillReference < OpenAI::Internal::Type::BaseModel
|
|
1044
|
+
# @!attribute skill_id
|
|
1045
|
+
# The ID of the referenced skill.
|
|
1046
|
+
#
|
|
1047
|
+
# @return [String]
|
|
1048
|
+
required :skill_id, String
|
|
1049
|
+
|
|
1050
|
+
# @!attribute type
|
|
1051
|
+
# References a skill created with the /v1/skills endpoint.
|
|
1052
|
+
#
|
|
1053
|
+
# @return [Symbol, :skill_reference]
|
|
1054
|
+
required :type, const: :skill_reference
|
|
1055
|
+
|
|
1056
|
+
# @!attribute version
|
|
1057
|
+
# Optional skill version. Use a positive integer or 'latest'. Omit for default.
|
|
1058
|
+
#
|
|
1059
|
+
# @return [String, nil]
|
|
1060
|
+
optional :version, String, nil?: true
|
|
1061
|
+
|
|
1062
|
+
# @!method initialize(skill_id:, version: nil, type: :skill_reference)
|
|
1063
|
+
# @param skill_id [String]
|
|
1064
|
+
# The ID of the referenced skill.
|
|
1065
|
+
#
|
|
1066
|
+
# @param version [String, nil]
|
|
1067
|
+
# Optional skill version. Use a positive integer or 'latest'. Omit for default.
|
|
1068
|
+
#
|
|
1069
|
+
# @param type [Symbol, :skill_reference]
|
|
1070
|
+
# References a skill created with the /v1/skills endpoint.
|
|
1071
|
+
end
|
|
1072
|
+
|
|
1073
|
+
class Inline < OpenAI::Internal::Type::BaseModel
|
|
1074
|
+
# @!attribute description
|
|
1075
|
+
# The description of the skill.
|
|
1076
|
+
#
|
|
1077
|
+
# @return [String]
|
|
1078
|
+
required :description, String
|
|
1079
|
+
|
|
1080
|
+
# @!attribute name
|
|
1081
|
+
# The name of the skill.
|
|
1082
|
+
#
|
|
1083
|
+
# @return [String]
|
|
1084
|
+
required :name, String
|
|
1085
|
+
|
|
1086
|
+
# @!attribute source
|
|
1087
|
+
# Inline skill payload
|
|
1088
|
+
#
|
|
1089
|
+
# @return [OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source]
|
|
1090
|
+
required(
|
|
1091
|
+
:source,
|
|
1092
|
+
-> {
|
|
1093
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source
|
|
1094
|
+
}
|
|
1095
|
+
)
|
|
1096
|
+
|
|
1097
|
+
# @!attribute type
|
|
1098
|
+
# Defines an inline skill for this request.
|
|
1099
|
+
#
|
|
1100
|
+
# @return [Symbol, :inline]
|
|
1101
|
+
required :type, const: :inline
|
|
1102
|
+
|
|
1103
|
+
# @!method initialize(description:, name:, source:, type: :inline)
|
|
1104
|
+
# @param description [String]
|
|
1105
|
+
# The description of the skill.
|
|
1106
|
+
#
|
|
1107
|
+
# @param name [String]
|
|
1108
|
+
# The name of the skill.
|
|
1109
|
+
#
|
|
1110
|
+
# @param source [OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source]
|
|
1111
|
+
# Inline skill payload
|
|
1112
|
+
#
|
|
1113
|
+
# @param type [Symbol, :inline]
|
|
1114
|
+
# Defines an inline skill for this request.
|
|
1115
|
+
|
|
1116
|
+
# @see OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline#source
|
|
1117
|
+
class Source < OpenAI::Internal::Type::BaseModel
|
|
1118
|
+
# @!attribute data
|
|
1119
|
+
# Base64-encoded skill zip bundle.
|
|
1120
|
+
#
|
|
1121
|
+
# @return [String]
|
|
1122
|
+
required :data, String
|
|
1123
|
+
|
|
1124
|
+
# @!attribute media_type
|
|
1125
|
+
# The media type of the inline skill payload. Must be `application/zip`.
|
|
1126
|
+
#
|
|
1127
|
+
# @return [Symbol, :"application/zip"]
|
|
1128
|
+
required :media_type, const: :"application/zip"
|
|
1129
|
+
|
|
1130
|
+
# @!attribute type
|
|
1131
|
+
# The type of the inline skill source. Must be `base64`.
|
|
1132
|
+
#
|
|
1133
|
+
# @return [Symbol, :base64]
|
|
1134
|
+
required :type, const: :base64
|
|
1135
|
+
|
|
1136
|
+
# @!method initialize(data:, media_type: :"application/zip", type: :base64)
|
|
1137
|
+
# Inline skill payload
|
|
1138
|
+
#
|
|
1139
|
+
# @param data [String]
|
|
1140
|
+
# Base64-encoded skill zip bundle.
|
|
1141
|
+
#
|
|
1142
|
+
# @param media_type [Symbol, :"application/zip"]
|
|
1143
|
+
# The media type of the inline skill payload. Must be `application/zip`.
|
|
1144
|
+
#
|
|
1145
|
+
# @param type [Symbol, :base64]
|
|
1146
|
+
# The type of the inline skill source. Must be `base64`.
|
|
1147
|
+
end
|
|
1148
|
+
end
|
|
1149
|
+
|
|
1150
|
+
# @!method self.variants
|
|
1151
|
+
# @return [Array(OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline)]
|
|
1152
|
+
end
|
|
1153
|
+
end
|
|
1154
|
+
|
|
1155
|
+
class ContainerReference < OpenAI::Internal::Type::BaseModel
|
|
1156
|
+
# @!attribute container_id
|
|
1157
|
+
# The ID of the referenced container.
|
|
1158
|
+
#
|
|
1159
|
+
# @return [String]
|
|
1160
|
+
required :container_id, String
|
|
1161
|
+
|
|
1162
|
+
# @!attribute type
|
|
1163
|
+
# References a container created with the /v1/containers endpoint
|
|
1164
|
+
#
|
|
1165
|
+
# @return [Symbol, :container_reference]
|
|
1166
|
+
required :type, const: :container_reference
|
|
1167
|
+
|
|
1168
|
+
# @!method initialize(container_id:, type: :container_reference)
|
|
1169
|
+
# @param container_id [String]
|
|
1170
|
+
# The ID of the referenced container.
|
|
1171
|
+
#
|
|
1172
|
+
# @param type [Symbol, :container_reference]
|
|
1173
|
+
# References a container created with the /v1/containers endpoint
|
|
1174
|
+
end
|
|
1175
|
+
|
|
1176
|
+
class Local < OpenAI::Internal::Type::BaseModel
|
|
1177
|
+
# @!attribute type
|
|
1178
|
+
# Use a local computer environment.
|
|
1179
|
+
#
|
|
1180
|
+
# @return [Symbol, :local]
|
|
1181
|
+
required :type, const: :local
|
|
1182
|
+
|
|
1183
|
+
# @!attribute skills
|
|
1184
|
+
# An optional list of skills.
|
|
1185
|
+
#
|
|
1186
|
+
# @return [Array<OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local::Skill>, nil]
|
|
1187
|
+
optional(
|
|
1188
|
+
:skills,
|
|
1189
|
+
-> {
|
|
1190
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
1191
|
+
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local::Skill
|
|
1192
|
+
]
|
|
1193
|
+
},
|
|
1194
|
+
nil?: true
|
|
1195
|
+
)
|
|
1196
|
+
|
|
1197
|
+
# @!method initialize(skills: nil, type: :local)
|
|
1198
|
+
# @param skills [Array<OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local::Skill>, nil]
|
|
1199
|
+
# An optional list of skills.
|
|
1200
|
+
#
|
|
1201
|
+
# @param type [Symbol, :local]
|
|
1202
|
+
# Use a local computer environment.
|
|
1203
|
+
class Skill < OpenAI::Internal::Type::BaseModel
|
|
1204
|
+
# @!attribute description
|
|
1205
|
+
# The description of the skill.
|
|
1206
|
+
#
|
|
1207
|
+
# @return [String]
|
|
1208
|
+
required :description, String
|
|
1209
|
+
|
|
1210
|
+
# @!attribute name
|
|
1211
|
+
# The name of the skill.
|
|
1212
|
+
#
|
|
1213
|
+
# @return [String]
|
|
1214
|
+
required :name, String
|
|
1215
|
+
|
|
1216
|
+
# @!attribute path
|
|
1217
|
+
# The path to the directory containing the skill.
|
|
1218
|
+
#
|
|
1219
|
+
# @return [String]
|
|
1220
|
+
required :path, String
|
|
1221
|
+
|
|
1222
|
+
# @!method initialize(description:, name:, path:)
|
|
1223
|
+
# @param description [String]
|
|
1224
|
+
# The description of the skill.
|
|
1225
|
+
#
|
|
1226
|
+
# @param name [String]
|
|
1227
|
+
# The name of the skill.
|
|
1228
|
+
#
|
|
1229
|
+
# @param path [String]
|
|
1230
|
+
# The path to the directory containing the skill.
|
|
1231
|
+
end
|
|
1232
|
+
end
|
|
1233
|
+
|
|
1234
|
+
# @!method self.variants
|
|
1235
|
+
# @return [Array(OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerReference, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local)]
|
|
1236
|
+
end
|
|
1237
|
+
end
|
|
1238
|
+
|
|
1239
|
+
class ImageGeneration < OpenAI::Internal::Type::BaseModel
|
|
1240
|
+
# @!attribute type
|
|
1241
|
+
#
|
|
1242
|
+
# @return [Symbol, :image_generation]
|
|
1243
|
+
required :type, const: :image_generation
|
|
1244
|
+
|
|
1245
|
+
# @!method initialize(type: :image_generation)
|
|
1246
|
+
# @param type [Symbol, :image_generation]
|
|
1247
|
+
end
|
|
1248
|
+
|
|
1249
|
+
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
1250
|
+
# @!attribute type
|
|
1251
|
+
#
|
|
1252
|
+
# @return [Symbol, :mcp]
|
|
1253
|
+
required :type, const: :mcp
|
|
1254
|
+
|
|
1255
|
+
# @!method initialize(type: :mcp)
|
|
1256
|
+
# @param type [Symbol, :mcp]
|
|
1257
|
+
end
|
|
1258
|
+
|
|
1259
|
+
class Custom < OpenAI::Internal::Type::BaseModel
|
|
1260
|
+
# @!attribute type
|
|
1261
|
+
#
|
|
1262
|
+
# @return [Symbol, :custom]
|
|
1263
|
+
required :type, const: :custom
|
|
1264
|
+
|
|
1265
|
+
# @!method initialize(type: :custom)
|
|
1266
|
+
# @param type [Symbol, :custom]
|
|
1267
|
+
end
|
|
1268
|
+
|
|
1269
|
+
class Namespace < OpenAI::Internal::Type::BaseModel
|
|
1270
|
+
# @!attribute type
|
|
1271
|
+
#
|
|
1272
|
+
# @return [Symbol, :namespace]
|
|
1273
|
+
required :type, const: :namespace
|
|
1274
|
+
|
|
1275
|
+
# @!method initialize(type: :namespace)
|
|
1276
|
+
# @param type [Symbol, :namespace]
|
|
1277
|
+
end
|
|
1278
|
+
|
|
1279
|
+
class ToolSearch < OpenAI::Internal::Type::BaseModel
|
|
1280
|
+
# @!attribute type
|
|
1281
|
+
#
|
|
1282
|
+
# @return [Symbol, :tool_search]
|
|
1283
|
+
required :type, const: :tool_search
|
|
1284
|
+
|
|
1285
|
+
# @!method initialize(type: :tool_search)
|
|
1286
|
+
# @param type [Symbol, :tool_search]
|
|
1287
|
+
end
|
|
1288
|
+
|
|
1289
|
+
class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
|
|
1290
|
+
# @!attribute type
|
|
1291
|
+
#
|
|
1292
|
+
# @return [Symbol, :programmatic_tool_calling]
|
|
1293
|
+
required :type, const: :programmatic_tool_calling
|
|
1294
|
+
|
|
1295
|
+
# @!method initialize(type: :programmatic_tool_calling)
|
|
1296
|
+
# @param type [Symbol, :programmatic_tool_calling]
|
|
1297
|
+
end
|
|
1298
|
+
|
|
1299
|
+
class Computer < OpenAI::Internal::Type::BaseModel
|
|
1300
|
+
# @!attribute type
|
|
1301
|
+
#
|
|
1302
|
+
# @return [Symbol, :computer]
|
|
1303
|
+
required :type, const: :computer
|
|
1304
|
+
|
|
1305
|
+
# @!method initialize(type: :computer)
|
|
1306
|
+
# @param type [Symbol, :computer]
|
|
1307
|
+
end
|
|
1308
|
+
|
|
1309
|
+
class ApplyPatch < OpenAI::Internal::Type::BaseModel
|
|
1310
|
+
# @!attribute type
|
|
1311
|
+
#
|
|
1312
|
+
# @return [Symbol, :apply_patch]
|
|
1313
|
+
required :type, const: :apply_patch
|
|
1314
|
+
|
|
1315
|
+
# @!method initialize(type: :apply_patch)
|
|
1316
|
+
# @param type [Symbol, :apply_patch]
|
|
1317
|
+
end
|
|
1318
|
+
|
|
326
1319
|
# @!method self.variants
|
|
327
|
-
# @return [Array(OpenAI::Models::Live::FunctionTool, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::WebSearch)]
|
|
1320
|
+
# @return [Array(OpenAI::Models::Live::FunctionTool, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Mcp, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Namespace, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ToolSearch, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::Tool::ApplyPatch)]
|
|
328
1321
|
end
|
|
329
1322
|
end
|
|
330
1323
|
end
|