openai 0.95.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 +51 -0
- data/README.md +5 -2
- data/docs/architecture/security-model.md +2 -2
- data/examples/audio/record_and_play.rb +1 -1
- data/lib/openai/helpers/live/transcript_grouper.rb +264 -0
- data/lib/openai/helpers/live/transcript_grouping.rb +309 -0
- data/lib/openai/helpers/live/websocket.rb +454 -0
- data/lib/openai/helpers/realtime/translation.rb +440 -0
- data/lib/openai/helpers/realtime.rb +1 -0
- data/lib/openai/helpers/responses_websocket/incremental.rb +246 -0
- data/lib/openai/helpers/responses_websocket/transports/async_websocket.rb +183 -0
- data/lib/openai/helpers/responses_websocket.rb +1 -0
- data/lib/openai/helpers/streaming/response_stream.rb +19 -11
- data/lib/openai/helpers/structured_output/chat_completion_parser.rb +0 -2
- data/lib/openai/helpers/structured_output/response_parser.rb +1 -2
- data/lib/openai/helpers/structured_output/union_of.rb +0 -2
- data/lib/openai/helpers/websocket/async_websocket_transport.rb +11 -6
- data/lib/openai/helpers/websocket/connection_manager.rb +9 -0
- data/lib/openai/internal/read_io_adapter.rb +0 -2
- data/lib/openai/internal/stream.rb +0 -2
- data/lib/openai/internal/type/base_model.rb +4 -6
- data/lib/openai/internal/type/converter.rb +5 -3
- data/lib/openai/internal/type/enum.rb +0 -2
- data/lib/openai/internal/type/union.rb +0 -6
- data/lib/openai/internal/type/unknown.rb +34 -6
- data/lib/openai/internal/util.rb +0 -4
- data/lib/openai/models/audio/speech_create_params.rb +9 -0
- data/lib/openai/models/audio/transcription_create_response.rb +4 -1
- data/lib/openai/models/audio/translation_create_response.rb +4 -1
- data/lib/openai/models/beta/agent.rb +3 -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 +5 -2
- data/lib/openai/models/beta/agent_output_item.rb +276 -1
- data/lib/openai/models/beta/agent_session.rb +252 -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 +5 -2
- data/lib/openai/models/beta/agents/environments/environment_template.rb +26 -2
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +51 -6
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +51 -9
- data/lib/openai/models/beta/agents/session_create_params.rb +5 -2
- data/lib/openai/models/beta/agents/session_update_params.rb +3 -0
- data/lib/openai/models/beta/agents/sessions/event_create_params.rb +2 -2
- data/lib/openai/models/beta/agents/vaults/credential.rb +10 -1
- data/lib/openai/models/beta/agents/vaults/credential_create_params.rb +12 -1
- data/lib/openai/models/beta/agents/vaults/credential_update_params.rb +14 -3
- data/lib/openai/models/beta/beta_response.rb +38 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +73 -1
- data/lib/openai/models/beta/beta_web_search_preview_tool.rb +9 -3
- data/lib/openai/models/beta/beta_web_search_tool.rb +9 -3
- data/lib/openai/models/beta/environment.rb +26 -2
- data/lib/openai/models/beta/environment_param.rb +46 -6
- 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/models/beta/response_compact_params.rb +3 -0
- data/lib/openai/models/beta/response_create_params.rb +68 -1
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/responses/response.rb +35 -1
- data/lib/openai/models/responses/response_compact_params.rb +3 -0
- data/lib/openai/models/responses/response_create_params.rb +65 -1
- data/lib/openai/models/responses/responses_client_event.rb +70 -1
- data/lib/openai/models/responses/web_search_preview_tool.rb +9 -3
- data/lib/openai/models/responses/web_search_tool.rb +9 -3
- data/lib/openai/net_http_client.rb +0 -2
- data/lib/openai/resources/audio/transcriptions.rb +5 -3
- data/lib/openai/resources/audio/translations.rb +1 -1
- data/lib/openai/resources/beta/agents/environments/templates.rb +12 -5
- 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/vaults/credentials.rb +12 -4
- data/lib/openai/resources/beta/agents.rb +2 -2
- data/lib/openai/resources/beta/responses.rb +8 -2
- data/lib/openai/resources/responses.rb +8 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -0
- data/rbi/openai/helpers/live/transcript_grouper.rbi +67 -0
- data/rbi/openai/helpers/live/websocket.rbi +299 -0
- data/rbi/openai/helpers/realtime/translation.rbi +137 -0
- data/rbi/openai/helpers/responses_websocket/incremental.rbi +32 -0
- data/rbi/openai/helpers/responses_websocket/transports/async_websocket.rbi +24 -0
- data/rbi/openai/helpers/streaming/response_stream.rbi +5 -0
- data/rbi/openai/internal/type/converter.rbi +3 -2
- data/rbi/openai/models/audio/speech_create_params.rbi +3 -0
- data/rbi/openai/models/audio/transcription_create_response.rbi +2 -1
- data/rbi/openai/models/audio/translation_create_response.rbi +2 -1
- data/rbi/openai/models/beta/agent.rbi +3 -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 +9 -3
- data/rbi/openai/models/beta/agent_output_item.rbi +422 -0
- data/rbi/openai/models/beta/agent_session.rbi +374 -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 +9 -3
- data/rbi/openai/models/beta/agents/environments/environment_template.rbi +53 -2
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +77 -7
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +77 -10
- data/rbi/openai/models/beta/agents/session_create_params.rbi +9 -3
- data/rbi/openai/models/beta/agents/session_update_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/sessions/event_create_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/vaults/credential.rbi +10 -0
- data/rbi/openai/models/beta/agents/vaults/credential_create_params.rbi +15 -0
- data/rbi/openai/models/beta/agents/vaults/credential_update_params.rbi +35 -6
- data/rbi/openai/models/beta/beta_response.rbi +64 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +128 -0
- data/rbi/openai/models/beta/beta_web_search_preview_tool.rbi +9 -3
- data/rbi/openai/models/beta/beta_web_search_tool.rbi +9 -3
- data/rbi/openai/models/beta/environment.rbi +53 -2
- data/rbi/openai/models/beta/environment_param.rbi +75 -7
- 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/models/beta/response_compact_params.rbi +1 -0
- data/rbi/openai/models/beta/response_create_params.rbi +100 -0
- data/rbi/openai/models/beta/session_turn_error.rbi +6 -0
- data/rbi/openai/models/chat_model.rbi +1 -0
- data/rbi/openai/models/responses/response.rbi +63 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +1 -0
- data/rbi/openai/models/responses/response_create_params.rbi +106 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +125 -0
- data/rbi/openai/models/responses/web_search_preview_tool.rbi +9 -3
- data/rbi/openai/models/responses/web_search_tool.rbi +9 -3
- data/rbi/openai/resources/audio/transcriptions.rbi +4 -2
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +10 -3
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +1 -0
- data/rbi/openai/resources/beta/agents/vaults/credentials.rbi +11 -3
- data/rbi/openai/resources/beta/agents.rbi +4 -2
- data/rbi/openai/resources/beta/responses.rbi +6 -0
- data/rbi/openai/resources/responses.rbi +11 -0
- data/responses-websocket.md +55 -0
- data/sig/openai/helpers/live/transcript_grouper.rbs +42 -0
- data/sig/openai/helpers/live/websocket.rbs +152 -0
- data/sig/openai/helpers/realtime/translation.rbs +81 -0
- data/sig/openai/helpers/responses_websocket/incremental.rbs +14 -0
- data/sig/openai/helpers/responses_websocket/transports/async_websocket.rbs +21 -0
- data/sig/openai/helpers/streaming/response_stream.rbs +9 -0
- data/sig/openai/internal/type/converter.rbs +3 -1
- data/sig/openai/models/audio/speech_create_params.rbs +6 -0
- data/sig/openai/models/audio/transcription_create_response.rbs +1 -0
- data/sig/openai/models/audio/translation_create_response.rbs +3 -1
- data/sig/openai/models/beta/agent.rbs +3 -1
- 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_create_params.rbs +5 -1
- data/sig/openai/models/beta/agent_output_item.rbs +254 -0
- data/sig/openai/models/beta/agent_session.rbs +218 -2
- 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/agent_update_params.rbs +5 -1
- data/sig/openai/models/beta/agents/environments/environment_template.rbs +29 -3
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +41 -6
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +41 -8
- data/sig/openai/models/beta/agents/session_create_params.rbs +5 -1
- data/sig/openai/models/beta/agents/session_update_params.rbs +5 -1
- data/sig/openai/models/beta/agents/vaults/credential.rbs +8 -0
- data/sig/openai/models/beta/agents/vaults/credential_create_params.rbs +14 -0
- data/sig/openai/models/beta/agents/vaults/credential_update_params.rbs +23 -4
- data/sig/openai/models/beta/beta_response.rbs +37 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +79 -0
- data/sig/openai/models/beta/beta_web_search_preview_tool.rbs +6 -2
- data/sig/openai/models/beta/beta_web_search_tool.rbs +6 -2
- data/sig/openai/models/beta/environment.rbs +29 -3
- data/sig/openai/models/beta/environment_param.rbs +41 -6
- 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/models/beta/response_compact_params.rbs +2 -0
- data/sig/openai/models/beta/response_create_params.rbs +79 -0
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat_model.rbs +2 -0
- data/sig/openai/models/responses/response.rbs +35 -0
- data/sig/openai/models/responses/response_compact_params.rbs +2 -0
- data/sig/openai/models/responses/response_create_params.rbs +77 -0
- data/sig/openai/models/responses/responses_client_event.rbs +77 -0
- data/sig/openai/models/responses/web_search_preview_tool.rbs +6 -2
- data/sig/openai/models/responses/web_search_tool.rbs +6 -2
- data/sig/openai/resources/beta/agents/environments/templates.rbs +2 -0
- data/sig/openai/resources/beta/agents/vaults/credentials.rbs +3 -1
- data/sig/openai/resources/beta/responses.rbs +2 -0
- data/sig/openai/resources/responses.rbs +4 -0
- metadata +23 -1
|
@@ -15,7 +15,8 @@ module OpenAI
|
|
|
15
15
|
OpenAI::Beta::PersistedAgentTool::ToolSearch,
|
|
16
16
|
OpenAI::Beta::PersistedAgentTool::ProgrammaticToolCalling,
|
|
17
17
|
OpenAI::Beta::PersistedAgentTool::Mcp,
|
|
18
|
-
OpenAI::Beta::PersistedAgentTool::WebSearch
|
|
18
|
+
OpenAI::Beta::PersistedAgentTool::WebSearch,
|
|
19
|
+
OpenAI::Beta::PersistedAgentTool::ComputerUse
|
|
19
20
|
)
|
|
20
21
|
end
|
|
21
22
|
|
|
@@ -495,6 +496,53 @@ module OpenAI
|
|
|
495
496
|
end
|
|
496
497
|
end
|
|
497
498
|
|
|
499
|
+
class ComputerUse < OpenAI::Internal::Type::BaseModel
|
|
500
|
+
OrHash = T.type_alias do
|
|
501
|
+
T.any(
|
|
502
|
+
OpenAI::Beta::PersistedAgentTool::ComputerUse,
|
|
503
|
+
OpenAI::Internal::AnyHash
|
|
504
|
+
)
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
# Whether computer tool outputs include screenshots.
|
|
508
|
+
sig { returns(T::Boolean) }
|
|
509
|
+
attr_accessor :include_screenshots
|
|
510
|
+
|
|
511
|
+
# The type of the object. Always `computer_use`.
|
|
512
|
+
sig { returns(Symbol) }
|
|
513
|
+
attr_accessor :type
|
|
514
|
+
|
|
515
|
+
# Browser use in an OpenAI-hosted session.
|
|
516
|
+
sig do
|
|
517
|
+
params(
|
|
518
|
+
|
|
519
|
+
include_screenshots: T::Boolean,
|
|
520
|
+
|
|
521
|
+
type: Symbol
|
|
522
|
+
)
|
|
523
|
+
.returns(T.attached_class)
|
|
524
|
+
end
|
|
525
|
+
def self.new(
|
|
526
|
+
|
|
527
|
+
# Whether computer tool outputs include screenshots.
|
|
528
|
+
include_screenshots:,
|
|
529
|
+
|
|
530
|
+
# The type of the object. Always `computer_use`.
|
|
531
|
+
|
|
532
|
+
type: :computer_use
|
|
533
|
+
)
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
sig do
|
|
537
|
+
override.returns(
|
|
538
|
+
{include_screenshots: T::Boolean, type: Symbol}
|
|
539
|
+
)
|
|
540
|
+
end
|
|
541
|
+
def to_hash
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
end
|
|
545
|
+
|
|
498
546
|
sig { override.returns(T::Array[OpenAI::Beta::PersistedAgentTool::Variants]) }
|
|
499
547
|
def self.variants
|
|
500
548
|
end
|
|
@@ -15,7 +15,8 @@ module OpenAI
|
|
|
15
15
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch,
|
|
16
16
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling,
|
|
17
17
|
OpenAI::Beta::PersistedAgentToolParam::Mcp,
|
|
18
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch
|
|
18
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch,
|
|
19
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse
|
|
19
20
|
)
|
|
20
21
|
end
|
|
21
22
|
|
|
@@ -534,6 +535,56 @@ module OpenAI
|
|
|
534
535
|
end
|
|
535
536
|
end
|
|
536
537
|
|
|
538
|
+
class ComputerUse < OpenAI::Internal::Type::BaseModel
|
|
539
|
+
OrHash = T.type_alias do
|
|
540
|
+
T.any(
|
|
541
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse,
|
|
542
|
+
OpenAI::Internal::AnyHash
|
|
543
|
+
)
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# The type of the object. Always `computer_use`.
|
|
547
|
+
sig { returns(Symbol) }
|
|
548
|
+
attr_accessor :type
|
|
549
|
+
|
|
550
|
+
# Whether computer tool outputs include screenshots. Defaults to `false`.
|
|
551
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
552
|
+
attr_reader :include_screenshots
|
|
553
|
+
|
|
554
|
+
sig { params(include_screenshots: T::Boolean).void }
|
|
555
|
+
attr_writer :include_screenshots
|
|
556
|
+
|
|
557
|
+
# Browser use in an OpenAI-hosted session.
|
|
558
|
+
sig do
|
|
559
|
+
params(
|
|
560
|
+
|
|
561
|
+
include_screenshots: T::Boolean,
|
|
562
|
+
|
|
563
|
+
type: Symbol
|
|
564
|
+
)
|
|
565
|
+
.returns(T.attached_class)
|
|
566
|
+
end
|
|
567
|
+
def self.new(
|
|
568
|
+
|
|
569
|
+
# Whether computer tool outputs include screenshots. Defaults to `false`.
|
|
570
|
+
include_screenshots: nil,
|
|
571
|
+
|
|
572
|
+
# The type of the object. Always `computer_use`.
|
|
573
|
+
|
|
574
|
+
type: :computer_use
|
|
575
|
+
)
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
sig do
|
|
579
|
+
override.returns(
|
|
580
|
+
{type: Symbol, include_screenshots: T::Boolean}
|
|
581
|
+
)
|
|
582
|
+
end
|
|
583
|
+
def to_hash
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
end
|
|
587
|
+
|
|
537
588
|
sig { override.returns(T::Array[OpenAI::Beta::PersistedAgentToolParam::Variants]) }
|
|
538
589
|
def self.variants
|
|
539
590
|
end
|
|
@@ -223,6 +223,7 @@ module OpenAI
|
|
|
223
223
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
224
224
|
|
|
225
225
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
226
|
+
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
226
227
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
227
228
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
228
229
|
GPT_5_6_SOL = T.let(:"gpt-5.6-sol", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
@@ -17,6 +17,13 @@ module OpenAI
|
|
|
17
17
|
)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
# Domain-specific access programs to use for this request.
|
|
21
|
+
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::AccessPrograms)) }
|
|
22
|
+
attr_reader :access_programs
|
|
23
|
+
|
|
24
|
+
sig { params(access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash).void }
|
|
25
|
+
attr_writer :access_programs
|
|
26
|
+
|
|
20
27
|
# Whether to run the model response in the background.
|
|
21
28
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
22
29
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -421,6 +428,8 @@ module OpenAI
|
|
|
421
428
|
sig do
|
|
422
429
|
params(
|
|
423
430
|
|
|
431
|
+
access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash,
|
|
432
|
+
|
|
424
433
|
background: T.nilable(T::Boolean),
|
|
425
434
|
|
|
426
435
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
|
|
@@ -520,6 +529,9 @@ module OpenAI
|
|
|
520
529
|
end
|
|
521
530
|
def self.new(
|
|
522
531
|
|
|
532
|
+
# Domain-specific access programs to use for this request.
|
|
533
|
+
access_programs: nil,
|
|
534
|
+
|
|
523
535
|
# Whether to run the model response in the background.
|
|
524
536
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
525
537
|
background: nil,
|
|
@@ -777,6 +789,7 @@ module OpenAI
|
|
|
777
789
|
sig do
|
|
778
790
|
override.returns(
|
|
779
791
|
{
|
|
792
|
+
access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms,
|
|
780
793
|
background: T.nilable(T::Boolean),
|
|
781
794
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]),
|
|
782
795
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam)),
|
|
@@ -845,6 +858,92 @@ module OpenAI
|
|
|
845
858
|
def to_hash
|
|
846
859
|
end
|
|
847
860
|
|
|
861
|
+
class AccessPrograms < OpenAI::Internal::Type::BaseModel
|
|
862
|
+
OrHash = T.type_alias do
|
|
863
|
+
T.any(
|
|
864
|
+
OpenAI::Beta::ResponseCreateParams::AccessPrograms,
|
|
865
|
+
OpenAI::Internal::AnyHash
|
|
866
|
+
)
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
# The Cyber access program to use for this request. Supported values are
|
|
870
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
871
|
+
# the program from the model's Cyber tier and your organization and project
|
|
872
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
873
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
874
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
875
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
876
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
877
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
878
|
+
# field, rather than an explicit Standard selection.
|
|
879
|
+
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol)) }
|
|
880
|
+
attr_reader :cyber
|
|
881
|
+
|
|
882
|
+
sig { params(cyber: OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol).void }
|
|
883
|
+
attr_writer :cyber
|
|
884
|
+
|
|
885
|
+
# Domain-specific access programs to use for this request.
|
|
886
|
+
sig do
|
|
887
|
+
params(
|
|
888
|
+
|
|
889
|
+
cyber: OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol
|
|
890
|
+
)
|
|
891
|
+
.returns(T.attached_class)
|
|
892
|
+
end
|
|
893
|
+
def self.new(
|
|
894
|
+
|
|
895
|
+
# The Cyber access program to use for this request. Supported values are
|
|
896
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
897
|
+
# the program from the model's Cyber tier and your organization and project
|
|
898
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
899
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
900
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
901
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
902
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
903
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
904
|
+
# field, rather than an explicit Standard selection.
|
|
905
|
+
|
|
906
|
+
cyber: nil
|
|
907
|
+
)
|
|
908
|
+
end
|
|
909
|
+
|
|
910
|
+
sig do
|
|
911
|
+
override.returns(
|
|
912
|
+
{cyber: OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol}
|
|
913
|
+
)
|
|
914
|
+
end
|
|
915
|
+
def to_hash
|
|
916
|
+
end
|
|
917
|
+
|
|
918
|
+
# The Cyber access program to use for this request. Supported values are
|
|
919
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
920
|
+
# the program from the model's Cyber tier and your organization and project
|
|
921
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
922
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
923
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
924
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
925
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
926
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
927
|
+
# field, rather than an explicit Standard selection.
|
|
928
|
+
module Cyber
|
|
929
|
+
extend OpenAI::Internal::Type::Enum
|
|
930
|
+
|
|
931
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber) }
|
|
932
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
933
|
+
|
|
934
|
+
STANDARD = T.let(:standard, OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol)
|
|
935
|
+
DAYBREAK_BLUE = T.let(
|
|
936
|
+
:daybreak_blue,
|
|
937
|
+
OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol
|
|
938
|
+
)
|
|
939
|
+
DAYBREAK_RED = T.let(:daybreak_red, OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol)
|
|
940
|
+
|
|
941
|
+
sig { override.returns(T::Array[OpenAI::Beta::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol]) }
|
|
942
|
+
def self.values
|
|
943
|
+
end
|
|
944
|
+
end
|
|
945
|
+
end
|
|
946
|
+
|
|
848
947
|
class ContextManagement < OpenAI::Internal::Type::BaseModel
|
|
849
948
|
OrHash = T.type_alias do
|
|
850
949
|
T.any(
|
|
@@ -947,6 +1046,7 @@ module OpenAI
|
|
|
947
1046
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
948
1047
|
|
|
949
1048
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1049
|
+
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
950
1050
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
951
1051
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
952
1052
|
GPT_5_6_SOL = T.let(:"gpt-5.6-sol", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
@@ -82,6 +82,12 @@ module OpenAI
|
|
|
82
82
|
# The request was rejected by a safety policy.
|
|
83
83
|
CYBER_POLICY = T.let(:cyber_policy, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
|
|
84
84
|
|
|
85
|
+
# The request was blocked by the safety systems.
|
|
86
|
+
MISALIGNMENT_POLICY_VIOLATION = T.let(
|
|
87
|
+
:misalignment_policy_violation,
|
|
88
|
+
OpenAI::Beta::SessionTurnError::Code::TaggedSymbol
|
|
89
|
+
)
|
|
90
|
+
|
|
85
91
|
# The request could not connect to the model service.
|
|
86
92
|
CONNECTION_FAILED = T.let(:connection_failed, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
|
|
87
93
|
|
|
@@ -10,6 +10,7 @@ module OpenAI
|
|
|
10
10
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
11
11
|
|
|
12
12
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::ChatModel::TaggedSymbol)
|
|
13
|
+
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::ChatModel::TaggedSymbol)
|
|
13
14
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::ChatModel::TaggedSymbol)
|
|
14
15
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::ChatModel::TaggedSymbol)
|
|
15
16
|
GPT_5_6_SOL = T.let(:"gpt-5.6-sol", OpenAI::ChatModel::TaggedSymbol)
|
|
@@ -18,6 +18,12 @@ module OpenAI
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
+
sig { returns(T.nilable(OpenAI::Responses::Response::AccessPrograms)) }
|
|
22
|
+
attr_reader :access_programs
|
|
23
|
+
|
|
24
|
+
sig { params(access_programs: T.nilable(OpenAI::Responses::Response::AccessPrograms::OrHash)).void }
|
|
25
|
+
attr_writer :access_programs
|
|
26
|
+
|
|
21
27
|
# Unix timestamp (in seconds) of when this Response was created.
|
|
22
28
|
sig { returns(Float) }
|
|
23
29
|
attr_accessor :created_at
|
|
@@ -338,6 +344,8 @@ module OpenAI
|
|
|
338
344
|
|
|
339
345
|
id: String,
|
|
340
346
|
|
|
347
|
+
access_programs: T.nilable(OpenAI::Responses::Response::AccessPrograms::OrHash),
|
|
348
|
+
|
|
341
349
|
created_at: Float,
|
|
342
350
|
|
|
343
351
|
error: T.nilable(OpenAI::Responses::ResponseError::OrHash),
|
|
@@ -478,6 +486,8 @@ module OpenAI
|
|
|
478
486
|
# Unique identifier for this Response.
|
|
479
487
|
id:,
|
|
480
488
|
|
|
489
|
+
access_programs:,
|
|
490
|
+
|
|
481
491
|
# Unix timestamp (in seconds) of when this Response was created.
|
|
482
492
|
created_at:,
|
|
483
493
|
|
|
@@ -715,6 +725,7 @@ module OpenAI
|
|
|
715
725
|
override.returns(
|
|
716
726
|
{
|
|
717
727
|
id: String,
|
|
728
|
+
access_programs: T.nilable(OpenAI::Responses::Response::AccessPrograms),
|
|
718
729
|
created_at: Float,
|
|
719
730
|
error: T.nilable(OpenAI::Responses::ResponseError),
|
|
720
731
|
incomplete_details: T.nilable(OpenAI::Responses::Response::IncompleteDetails),
|
|
@@ -755,6 +766,58 @@ module OpenAI
|
|
|
755
766
|
def to_hash
|
|
756
767
|
end
|
|
757
768
|
|
|
769
|
+
class AccessPrograms < OpenAI::Internal::Type::BaseModel
|
|
770
|
+
OrHash = T.type_alias do
|
|
771
|
+
T.any(
|
|
772
|
+
OpenAI::Responses::Response::AccessPrograms,
|
|
773
|
+
OpenAI::Internal::AnyHash
|
|
774
|
+
)
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
# The effective Cyber access program used for this response.
|
|
778
|
+
sig { returns(OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol) }
|
|
779
|
+
attr_accessor :cyber
|
|
780
|
+
|
|
781
|
+
sig do
|
|
782
|
+
params(
|
|
783
|
+
|
|
784
|
+
cyber: OpenAI::Responses::Response::AccessPrograms::Cyber::OrSymbol
|
|
785
|
+
)
|
|
786
|
+
.returns(T.attached_class)
|
|
787
|
+
end
|
|
788
|
+
def self.new(
|
|
789
|
+
|
|
790
|
+
# The effective Cyber access program used for this response.
|
|
791
|
+
|
|
792
|
+
cyber:
|
|
793
|
+
)
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
sig do
|
|
797
|
+
override.returns(
|
|
798
|
+
{cyber: OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol}
|
|
799
|
+
)
|
|
800
|
+
end
|
|
801
|
+
def to_hash
|
|
802
|
+
end
|
|
803
|
+
|
|
804
|
+
# The effective Cyber access program used for this response.
|
|
805
|
+
module Cyber
|
|
806
|
+
extend OpenAI::Internal::Type::Enum
|
|
807
|
+
|
|
808
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Responses::Response::AccessPrograms::Cyber) }
|
|
809
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
810
|
+
|
|
811
|
+
STANDARD = T.let(:standard, OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol)
|
|
812
|
+
DAYBREAK_BLUE = T.let(:daybreak_blue, OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol)
|
|
813
|
+
DAYBREAK_RED = T.let(:daybreak_red, OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol)
|
|
814
|
+
|
|
815
|
+
sig { override.returns(T::Array[OpenAI::Responses::Response::AccessPrograms::Cyber::TaggedSymbol]) }
|
|
816
|
+
def self.values
|
|
817
|
+
end
|
|
818
|
+
end
|
|
819
|
+
end
|
|
820
|
+
|
|
758
821
|
class IncompleteDetails < OpenAI::Internal::Type::BaseModel
|
|
759
822
|
OrHash = T.type_alias do
|
|
760
823
|
T.any(
|
|
@@ -215,6 +215,7 @@ module OpenAI
|
|
|
215
215
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
216
216
|
|
|
217
217
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
218
|
+
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
218
219
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
219
220
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
220
221
|
GPT_5_6_SOL = T.let(:"gpt-5.6-sol", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
@@ -17,6 +17,13 @@ module OpenAI
|
|
|
17
17
|
)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
# Domain-specific access programs to use for this request.
|
|
21
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::AccessPrograms)) }
|
|
22
|
+
attr_reader :access_programs
|
|
23
|
+
|
|
24
|
+
sig { params(access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash).void }
|
|
25
|
+
attr_writer :access_programs
|
|
26
|
+
|
|
20
27
|
# Whether to run the model response in the background.
|
|
21
28
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
22
29
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -426,6 +433,8 @@ module OpenAI
|
|
|
426
433
|
sig do
|
|
427
434
|
params(
|
|
428
435
|
|
|
436
|
+
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash,
|
|
437
|
+
|
|
429
438
|
background: T.nilable(T::Boolean),
|
|
430
439
|
|
|
431
440
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
|
|
@@ -521,6 +530,9 @@ module OpenAI
|
|
|
521
530
|
end
|
|
522
531
|
def self.new(
|
|
523
532
|
|
|
533
|
+
# Domain-specific access programs to use for this request.
|
|
534
|
+
access_programs: nil,
|
|
535
|
+
|
|
524
536
|
# Whether to run the model response in the background.
|
|
525
537
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
526
538
|
background: nil,
|
|
@@ -773,6 +785,7 @@ module OpenAI
|
|
|
773
785
|
sig do
|
|
774
786
|
override.returns(
|
|
775
787
|
{
|
|
788
|
+
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms,
|
|
776
789
|
background: T.nilable(T::Boolean),
|
|
777
790
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]),
|
|
778
791
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam)),
|
|
@@ -839,6 +852,99 @@ module OpenAI
|
|
|
839
852
|
def to_hash
|
|
840
853
|
end
|
|
841
854
|
|
|
855
|
+
class AccessPrograms < OpenAI::Internal::Type::BaseModel
|
|
856
|
+
OrHash = T.type_alias do
|
|
857
|
+
T.any(
|
|
858
|
+
OpenAI::Responses::ResponseCreateParams::AccessPrograms,
|
|
859
|
+
OpenAI::Internal::AnyHash
|
|
860
|
+
)
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
# The Cyber access program to use for this request. Supported values are
|
|
864
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
865
|
+
# the program from the model's Cyber tier and your organization and project
|
|
866
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
867
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
868
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
869
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
870
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
871
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
872
|
+
# field, rather than an explicit Standard selection.
|
|
873
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol)) }
|
|
874
|
+
attr_reader :cyber
|
|
875
|
+
|
|
876
|
+
sig { params(cyber: OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol).void }
|
|
877
|
+
attr_writer :cyber
|
|
878
|
+
|
|
879
|
+
# Domain-specific access programs to use for this request.
|
|
880
|
+
sig do
|
|
881
|
+
params(
|
|
882
|
+
|
|
883
|
+
cyber: OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol
|
|
884
|
+
)
|
|
885
|
+
.returns(T.attached_class)
|
|
886
|
+
end
|
|
887
|
+
def self.new(
|
|
888
|
+
|
|
889
|
+
# The Cyber access program to use for this request. Supported values are
|
|
890
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
891
|
+
# the program from the model's Cyber tier and your organization and project
|
|
892
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
893
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
894
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
895
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
896
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
897
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
898
|
+
# field, rather than an explicit Standard selection.
|
|
899
|
+
|
|
900
|
+
cyber: nil
|
|
901
|
+
)
|
|
902
|
+
end
|
|
903
|
+
|
|
904
|
+
sig do
|
|
905
|
+
override.returns(
|
|
906
|
+
{cyber: OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::OrSymbol}
|
|
907
|
+
)
|
|
908
|
+
end
|
|
909
|
+
def to_hash
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
# The Cyber access program to use for this request. Supported values are
|
|
913
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
914
|
+
# the program from the model's Cyber tier and your organization and project
|
|
915
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
916
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
917
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
918
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
919
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
920
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
921
|
+
# field, rather than an explicit Standard selection.
|
|
922
|
+
module Cyber
|
|
923
|
+
extend OpenAI::Internal::Type::Enum
|
|
924
|
+
|
|
925
|
+
TaggedSymbol = T.type_alias {
|
|
926
|
+
T.all(Symbol, OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber)
|
|
927
|
+
}
|
|
928
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
929
|
+
|
|
930
|
+
STANDARD = T.let(:standard, OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol)
|
|
931
|
+
DAYBREAK_BLUE = T.let(
|
|
932
|
+
:daybreak_blue,
|
|
933
|
+
OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol
|
|
934
|
+
)
|
|
935
|
+
DAYBREAK_RED = T.let(
|
|
936
|
+
:daybreak_red,
|
|
937
|
+
OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
sig {
|
|
941
|
+
override.returns(T::Array[OpenAI::Responses::ResponseCreateParams::AccessPrograms::Cyber::TaggedSymbol])
|
|
942
|
+
}
|
|
943
|
+
def self.values
|
|
944
|
+
end
|
|
945
|
+
end
|
|
946
|
+
end
|
|
947
|
+
|
|
842
948
|
class ContextManagement < OpenAI::Internal::Type::BaseModel
|
|
843
949
|
OrHash = T.type_alias do
|
|
844
950
|
T.any(
|