openai 0.114.0 → 0.115.1
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 +43 -0
- data/README.md +17 -2
- data/docs/architecture/security-model.md +11 -16
- data/examples/responses/websocket_workflows.rb +78 -3
- data/lib/openai/helpers/chat/tool_runner.rb +1 -1
- data/lib/openai/helpers/live/websocket.rb +31 -0
- data/lib/openai/helpers/realtime/connection.rb +33 -0
- data/lib/openai/helpers/realtime/connection_manager.rb +1 -0
- data/lib/openai/helpers/realtime/conversation_item_variant_resolver.rb +5 -0
- data/lib/openai/helpers/realtime/recovery.rb +5 -1
- data/lib/openai/helpers/realtime/translation.rb +5 -0
- data/lib/openai/helpers/realtime/transports/async_websocket.rb +19 -0
- data/lib/openai/helpers/responses_websocket/connection.rb +53 -15
- data/lib/openai/helpers/responses_websocket/connection_manager.rb +1 -0
- data/lib/openai/helpers/responses_websocket/connection_resources.rb +1 -1
- data/lib/openai/helpers/structured_output/response_parser.rb +1 -0
- data/lib/openai/helpers/structured_output.rb +58 -0
- data/lib/openai/helpers/websocket/connection_manager.rb +11 -0
- data/lib/openai/helpers/websocket/resource.rb +1 -0
- data/lib/openai/helpers/websocket/typed_connection.rb +1 -0
- data/lib/openai/internal/type/array_of.rb +1 -1
- data/lib/openai/internal/type/hash_of.rb +1 -1
- data/lib/openai/internal/type/request_parameters.rb +2 -1
- data/lib/openai/internal/type/union.rb +18 -6
- data/lib/openai/models/admin/organization/external_key.rb +169 -0
- data/lib/openai/models/admin/organization/external_key_create_params.rb +311 -0
- data/lib/openai/models/admin/organization/external_key_delete_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_list_params.rb +69 -0
- data/lib/openai/models/admin/organization/external_key_retrieve_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_validate_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_validate_response.rb +20 -0
- data/lib/openai/models/audio/speech_model.rb +12 -0
- data/lib/openai/models/audio_model.rb +15 -0
- data/lib/openai/models/beta/agent.rb +49 -1
- data/lib/openai/models/beta/agent_create_params.rb +51 -1
- data/lib/openai/models/beta/agent_session.rb +75 -2
- data/lib/openai/models/beta/agent_update_params.rb +62 -1
- data/lib/openai/models/beta/agents/session_create_params.rb +94 -2
- data/lib/openai/models/beta/agents/session_list_params.rb +16 -1
- data/lib/openai/models/beta/agents/session_update_params.rb +50 -5
- data/lib/openai/models/beta/assistant_update_params.rb +18 -0
- data/lib/openai/models/beta/beta_response.rb +224 -1
- data/lib/openai/models/beta/beta_response_configuration_update_item.rb +64 -3
- data/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +64 -4
- data/lib/openai/models/beta/beta_response_input_item.rb +2 -3
- data/lib/openai/models/beta/beta_response_item.rb +2 -2
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +6 -6
- data/lib/openai/models/beta/beta_responses_client_event.rb +20 -1
- data/lib/openai/models/beta/beta_tool.rb +6 -6
- data/lib/openai/models/beta/response_compact_params.rb +6 -0
- data/lib/openai/models/beta/response_create_params.rb +6 -0
- data/lib/openai/models/chat_model.rb +6 -0
- data/lib/openai/models/conversations/conversation_item.rb +2 -2
- data/lib/openai/models/image_edit_params.rb +46 -25
- data/lib/openai/models/live/fork_server_event.rb +43 -3
- data/lib/openai/models/live/server_event.rb +43 -3
- data/lib/openai/models/live/sideband_client_event.rb +40 -1
- data/lib/openai/models/live/sideband_server_event.rb +43 -3
- data/lib/openai/models/realtime/audio_transcription.rb +15 -0
- data/lib/openai/models/realtime/conversation_item_added.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_create_event.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_created_event.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_done.rb +2 -2
- data/lib/openai/models/realtime/realtime_response.rb +2 -2
- data/lib/openai/models/realtime/realtime_response_create_params.rb +2 -2
- data/lib/openai/models/realtime/realtime_server_event.rb +2 -2
- data/lib/openai/models/realtime/realtime_session.rb +18 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +18 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +18 -0
- data/lib/openai/models/realtime/response_output_item_added_event.rb +2 -2
- data/lib/openai/models/realtime/response_output_item_done_event.rb +2 -2
- data/lib/openai/models/responses/response.rb +221 -1
- data/lib/openai/models/responses/response_compact_params.rb +6 -0
- data/lib/openai/models/responses/response_configuration_update_item.rb +50 -3
- data/lib/openai/models/responses/response_configuration_update_item_param.rb +50 -4
- data/lib/openai/models/responses/response_input_item.rb +2 -3
- data/lib/openai/models/responses/response_item.rb +2 -2
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +6 -6
- data/lib/openai/models/responses/responses_client_event.rb +14 -1
- data/lib/openai/models/responses/tool.rb +6 -6
- data/lib/openai/net_http_client.rb +6 -0
- data/lib/openai/providers/vertex.rb +0 -10
- data/lib/openai/resources/admin/organization/external_keys.rb +132 -0
- data/lib/openai/resources/admin/organization.rb +4 -0
- data/lib/openai/resources/audio/speech.rb +8 -0
- data/lib/openai/resources/audio/translations.rb +8 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -6
- data/lib/openai/resources/beta/agents.rb +17 -2
- data/lib/openai/resources/images.rb +36 -18
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +8 -0
- data/rbi/openai/helpers/live/websocket.rbi +1 -12
- data/rbi/openai/helpers/realtime/connection.rbi +5 -0
- data/rbi/openai/helpers/realtime/transports/async_websocket.rbi +5 -0
- data/rbi/openai/helpers/responses_websocket/connection.rbi +7 -2
- data/rbi/openai/helpers/structured_output.rbi +10 -0
- data/rbi/openai/internal/type/array_of.rbi +1 -1
- data/rbi/openai/internal/type/hash_of.rbi +1 -1
- data/rbi/openai/internal/type/union.rbi +5 -0
- data/rbi/openai/models/admin/organization/external_key.rbi +301 -0
- data/rbi/openai/models/admin/organization/external_key_create_params.rbi +532 -0
- data/rbi/openai/models/admin/organization/external_key_delete_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_list_params.rbi +129 -0
- data/rbi/openai/models/admin/organization/external_key_retrieve_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_validate_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_validate_response.rbi +50 -0
- data/rbi/openai/models/beta/agent.rbi +103 -1
- data/rbi/openai/models/beta/agent_create_params.rbi +109 -0
- data/rbi/openai/models/beta/agent_session.rbi +136 -3
- data/rbi/openai/models/beta/agent_update_params.rbi +120 -0
- data/rbi/openai/models/beta/agents/session_create_params.rbi +153 -0
- data/rbi/openai/models/beta/agents/session_list_params.rbi +19 -0
- data/rbi/openai/models/beta/agents/session_update_params.rbi +94 -6
- data/rbi/openai/models/beta/beta_response.rbi +394 -0
- data/rbi/openai/models/beta/beta_response_configuration_update_item.rbi +113 -3
- data/rbi/openai/models/beta/beta_response_configuration_update_item_param.rbi +125 -4
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +6 -6
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +17 -0
- data/rbi/openai/models/beta/beta_tool.rbi +6 -6
- data/rbi/openai/models/decision_create_params.rbi +4 -1
- data/rbi/openai/models/image_edit_params.rbi +49 -24
- data/rbi/openai/models/live/fork_server_event.rbi +65 -1
- data/rbi/openai/models/live/server_event.rbi +65 -1
- data/rbi/openai/models/live/sideband_client_event.rbi +60 -0
- data/rbi/openai/models/live/sideband_server_event.rbi +65 -1
- data/rbi/openai/models/realtime/conversation_item_added.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_create_event.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_created_event.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_done.rbi +6 -3
- data/rbi/openai/models/realtime/realtime_response.rbi +8 -4
- data/rbi/openai/models/realtime/realtime_response_create_params.rbi +8 -4
- data/rbi/openai/models/realtime/realtime_server_event.rbi +6 -3
- data/rbi/openai/models/realtime/response_output_item_added_event.rbi +6 -3
- data/rbi/openai/models/realtime/response_output_item_done_event.rbi +6 -3
- data/rbi/openai/models/responses/response.rbi +394 -0
- data/rbi/openai/models/responses/response_configuration_update_item.rbi +76 -3
- data/rbi/openai/models/responses/response_configuration_update_item_param.rbi +74 -4
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +6 -6
- data/rbi/openai/models/responses/responses_client_event.rbi +17 -0
- data/rbi/openai/models/responses/tool.rbi +6 -6
- data/rbi/openai/net_http_client.rbi +5 -0
- data/rbi/openai/resources/admin/organization/external_keys.rbi +86 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -0
- data/rbi/openai/resources/audio/speech.rbi +8 -0
- data/rbi/openai/resources/audio/translations.rbi +6 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +18 -2
- data/rbi/openai/resources/beta/agents.rbi +15 -0
- data/rbi/openai/resources/images.rbi +34 -16
- data/rbi/openai/resources/responses.rbi +2 -0
- data/realtime.md +6 -0
- data/responses-websocket.md +53 -0
- data/sig/openai/helpers/live/websocket.rbs +1 -9
- data/sig/openai/helpers/realtime/connection.rbs +3 -0
- data/sig/openai/helpers/realtime/transports/async_websocket.rbs +3 -0
- data/sig/openai/helpers/responses_websocket/connection.rbs +7 -1
- data/sig/openai/helpers/structured_output.rbs +9 -0
- data/sig/openai/internal/type/union.rbs +4 -0
- data/sig/openai/models/admin/organization/external_key.rbs +186 -0
- data/sig/openai/models/admin/organization/external_key_create_params.rbs +423 -0
- data/sig/openai/models/admin/organization/external_key_delete_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_list_params.rbs +81 -0
- data/sig/openai/models/admin/organization/external_key_retrieve_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_validate_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_validate_response.rbs +17 -0
- data/sig/openai/models/admin/organization/external_storage_create_params.rbs +72 -2
- data/sig/openai/models/audio/speech_create_params.rbs +15 -2
- data/sig/openai/models/audio/transcription_create_params.rbs +30 -2
- data/sig/openai/models/audio/voice_create_params.rbs +47 -2
- data/sig/openai/models/beta/agent.rbs +54 -2
- data/sig/openai/models/beta/agent_create_params.rbs +54 -0
- data/sig/openai/models/beta/agent_session.rbs +82 -3
- data/sig/openai/models/beta/agent_update_params.rbs +64 -0
- data/sig/openai/models/beta/agents/session_create_params.rbs +91 -0
- data/sig/openai/models/beta/agents/session_list_params.rbs +20 -0
- data/sig/openai/models/beta/agents/session_update_params.rbs +48 -6
- data/sig/openai/models/beta/assistant_create_params.rbs +5 -2
- data/sig/openai/models/beta/beta_response.rbs +223 -0
- data/sig/openai/models/beta/beta_response_configuration_update_item.rbs +58 -2
- data/sig/openai/models/beta/beta_response_configuration_update_item_param.rbs +58 -2
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +4 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +17 -0
- data/sig/openai/models/beta/beta_tool.rbs +4 -4
- data/sig/openai/models/beta/response_create_params.rbs +5 -2
- data/sig/openai/models/beta/responses/input_token_count_params.rbs +10 -2
- data/sig/openai/models/beta/thread_create_and_run_params.rbs +11 -5
- data/sig/openai/models/beta/thread_create_params.rbs +11 -5
- data/sig/openai/models/beta/threads/message_create_params.rbs +6 -3
- data/sig/openai/models/beta/threads/run_create_params.rbs +6 -3
- data/sig/openai/models/decision_create_params.rbs +27 -2
- data/sig/openai/models/eval_create_params.rbs +25 -4
- data/sig/openai/models/evals/run_create_params.rbs +52 -8
- data/sig/openai/models/image_edit_params.rbs +47 -16
- data/sig/openai/models/live/fork_server_event.rbs +39 -0
- data/sig/openai/models/live/server_event.rbs +39 -0
- data/sig/openai/models/live/session_accept_params.rbs +39 -2
- data/sig/openai/models/live/sideband_client_event.rbs +32 -0
- data/sig/openai/models/live/sideband_server_event.rbs +39 -0
- data/sig/openai/models/realtime/conversation_item.rbs +1 -0
- data/sig/openai/models/responses/input_token_count_params.rbs +10 -2
- data/sig/openai/models/responses/response.rbs +223 -0
- data/sig/openai/models/responses/response_configuration_update_item.rbs +45 -2
- data/sig/openai/models/responses/response_configuration_update_item_param.rbs +45 -2
- data/sig/openai/models/responses/response_create_params.rbs +5 -2
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +4 -4
- data/sig/openai/models/responses/responses_client_event.rbs +17 -0
- data/sig/openai/models/responses/tool.rbs +4 -4
- data/sig/openai/models/video_edit_params.rbs +11 -2
- data/sig/openai/models/video_extend_params.rbs +11 -2
- data/sig/openai/net_http_client.rbs +3 -0
- data/sig/openai/resources/admin/organization/external_keys.rbs +70 -0
- data/sig/openai/resources/admin/organization/external_storage.rbs +23 -1
- data/sig/openai/resources/admin/organization.rbs +2 -0
- data/sig/openai/resources/audio/speech.rbs +2 -1
- data/sig/openai/resources/audio/transcriptions.rbs +14 -2
- data/sig/openai/resources/audio/voices.rbs +14 -1
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -0
- data/sig/openai/resources/beta/agents.rbs +4 -0
- data/sig/openai/resources/beta/responses/input_tokens.rbs +2 -1
- data/sig/openai/resources/beta/responses.rbs +4 -2
- data/sig/openai/resources/decisions.rbs +7 -1
- data/sig/openai/resources/images.rbs +2 -0
- data/sig/openai/resources/responses/input_tokens.rbs +2 -1
- data/sig/openai/resources/responses.rbs +5 -2
- data/sig/openai/resources/videos.rbs +2 -2
- metadata +43 -1
|
@@ -299,6 +299,24 @@ module OpenAI
|
|
|
299
299
|
sig { params(text: OpenAI::Responses::ResponseTextConfig::OrHash).void }
|
|
300
300
|
attr_writer :text
|
|
301
301
|
|
|
302
|
+
# Usage reported by hosted tools, separate from base model `usage`. The field can
|
|
303
|
+
# be omitted when tool usage is unavailable. When present, tool families with no
|
|
304
|
+
# recorded usage have zero counts.
|
|
305
|
+
#
|
|
306
|
+
# `image_gen` sums available token counts across image generation calls. Calls
|
|
307
|
+
# with missing or incomplete usage records may be skipped. Output token details
|
|
308
|
+
# and cached input counts can be omitted. An omitted cache count means cache usage
|
|
309
|
+
# is unknown.
|
|
310
|
+
#
|
|
311
|
+
# `web_search.num_requests` counts billable searches. Discounted searches and
|
|
312
|
+
# actions such as opening a page are excluded. Use billing records to reconcile
|
|
313
|
+
# final charges.
|
|
314
|
+
sig { returns(T.nilable(OpenAI::Responses::Response::ToolUsage)) }
|
|
315
|
+
attr_reader :tool_usage
|
|
316
|
+
|
|
317
|
+
sig { params(tool_usage: OpenAI::Responses::Response::ToolUsage::OrHash).void }
|
|
318
|
+
attr_writer :tool_usage
|
|
319
|
+
|
|
302
320
|
# An integer between 0 and 20 specifying the maximum number of most likely tokens
|
|
303
321
|
# to return at each token position, each with an associated log probability. In
|
|
304
322
|
# some cases, the number of returned tokens may be fewer than requested.
|
|
@@ -464,6 +482,8 @@ module OpenAI
|
|
|
464
482
|
|
|
465
483
|
text: OpenAI::Responses::ResponseTextConfig::OrHash,
|
|
466
484
|
|
|
485
|
+
tool_usage: OpenAI::Responses::Response::ToolUsage::OrHash,
|
|
486
|
+
|
|
467
487
|
top_logprobs: T.nilable(Integer),
|
|
468
488
|
|
|
469
489
|
truncation: T.nilable(OpenAI::Responses::Response::Truncation::OrSymbol),
|
|
@@ -685,6 +705,20 @@ module OpenAI
|
|
|
685
705
|
# - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
686
706
|
text: nil,
|
|
687
707
|
|
|
708
|
+
# Usage reported by hosted tools, separate from base model `usage`. The field can
|
|
709
|
+
# be omitted when tool usage is unavailable. When present, tool families with no
|
|
710
|
+
# recorded usage have zero counts.
|
|
711
|
+
#
|
|
712
|
+
# `image_gen` sums available token counts across image generation calls. Calls
|
|
713
|
+
# with missing or incomplete usage records may be skipped. Output token details
|
|
714
|
+
# and cached input counts can be omitted. An omitted cache count means cache usage
|
|
715
|
+
# is unknown.
|
|
716
|
+
#
|
|
717
|
+
# `web_search.num_requests` counts billable searches. Discounted searches and
|
|
718
|
+
# actions such as opening a page are excluded. Use billing records to reconcile
|
|
719
|
+
# final charges.
|
|
720
|
+
tool_usage: nil,
|
|
721
|
+
|
|
688
722
|
# An integer between 0 and 20 specifying the maximum number of most likely tokens
|
|
689
723
|
# to return at each token position, each with an associated log probability. In
|
|
690
724
|
# some cases, the number of returned tokens may be fewer than requested.
|
|
@@ -751,6 +785,7 @@ module OpenAI
|
|
|
751
785
|
service_tier: T.nilable(OpenAI::Responses::Response::ServiceTier::TaggedSymbol),
|
|
752
786
|
status: OpenAI::Responses::ResponseStatus::TaggedSymbol,
|
|
753
787
|
text: OpenAI::Responses::ResponseTextConfig,
|
|
788
|
+
tool_usage: OpenAI::Responses::Response::ToolUsage,
|
|
754
789
|
top_logprobs: T.nilable(Integer),
|
|
755
790
|
truncation: T.nilable(OpenAI::Responses::Response::Truncation::TaggedSymbol),
|
|
756
791
|
usage: OpenAI::Responses::ResponseUsage,
|
|
@@ -1904,6 +1939,365 @@ module OpenAI
|
|
|
1904
1939
|
end
|
|
1905
1940
|
end
|
|
1906
1941
|
|
|
1942
|
+
class ToolUsage < OpenAI::Internal::Type::BaseModel
|
|
1943
|
+
OrHash = T.type_alias do
|
|
1944
|
+
T.any(
|
|
1945
|
+
OpenAI::Responses::Response::ToolUsage,
|
|
1946
|
+
OpenAI::Internal::AnyHash
|
|
1947
|
+
)
|
|
1948
|
+
end
|
|
1949
|
+
|
|
1950
|
+
# Aggregated usage statistics for image generation tool calls.
|
|
1951
|
+
sig { returns(OpenAI::Responses::Response::ToolUsage::ImageGen) }
|
|
1952
|
+
attr_reader :image_gen
|
|
1953
|
+
|
|
1954
|
+
sig { params(image_gen: OpenAI::Responses::Response::ToolUsage::ImageGen::OrHash).void }
|
|
1955
|
+
attr_writer :image_gen
|
|
1956
|
+
|
|
1957
|
+
# Aggregated billable usage statistics for web search tool calls.
|
|
1958
|
+
sig { returns(OpenAI::Responses::Response::ToolUsage::WebSearch) }
|
|
1959
|
+
attr_reader :web_search
|
|
1960
|
+
|
|
1961
|
+
sig { params(web_search: OpenAI::Responses::Response::ToolUsage::WebSearch::OrHash).void }
|
|
1962
|
+
attr_writer :web_search
|
|
1963
|
+
|
|
1964
|
+
# Usage reported by hosted tools, separate from base model `usage`. The field can
|
|
1965
|
+
# be omitted when tool usage is unavailable. When present, tool families with no
|
|
1966
|
+
# recorded usage have zero counts.
|
|
1967
|
+
#
|
|
1968
|
+
# `image_gen` sums available token counts across image generation calls. Calls
|
|
1969
|
+
# with missing or incomplete usage records may be skipped. Output token details
|
|
1970
|
+
# and cached input counts can be omitted. An omitted cache count means cache usage
|
|
1971
|
+
# is unknown.
|
|
1972
|
+
#
|
|
1973
|
+
# `web_search.num_requests` counts billable searches. Discounted searches and
|
|
1974
|
+
# actions such as opening a page are excluded. Use billing records to reconcile
|
|
1975
|
+
# final charges.
|
|
1976
|
+
sig do
|
|
1977
|
+
params(
|
|
1978
|
+
|
|
1979
|
+
image_gen: OpenAI::Responses::Response::ToolUsage::ImageGen::OrHash,
|
|
1980
|
+
|
|
1981
|
+
web_search: OpenAI::Responses::Response::ToolUsage::WebSearch::OrHash
|
|
1982
|
+
)
|
|
1983
|
+
.returns(T.attached_class)
|
|
1984
|
+
end
|
|
1985
|
+
def self.new(
|
|
1986
|
+
|
|
1987
|
+
# Aggregated usage statistics for image generation tool calls.
|
|
1988
|
+
image_gen:,
|
|
1989
|
+
|
|
1990
|
+
# Aggregated billable usage statistics for web search tool calls.
|
|
1991
|
+
|
|
1992
|
+
web_search:
|
|
1993
|
+
)
|
|
1994
|
+
end
|
|
1995
|
+
|
|
1996
|
+
sig do
|
|
1997
|
+
override.returns(
|
|
1998
|
+
{
|
|
1999
|
+
image_gen: OpenAI::Responses::Response::ToolUsage::ImageGen,
|
|
2000
|
+
web_search: OpenAI::Responses::Response::ToolUsage::WebSearch
|
|
2001
|
+
}
|
|
2002
|
+
)
|
|
2003
|
+
end
|
|
2004
|
+
def to_hash
|
|
2005
|
+
end
|
|
2006
|
+
|
|
2007
|
+
class ImageGen < OpenAI::Internal::Type::BaseModel
|
|
2008
|
+
OrHash = T.type_alias do
|
|
2009
|
+
T.any(
|
|
2010
|
+
OpenAI::Responses::Response::ToolUsage::ImageGen,
|
|
2011
|
+
OpenAI::Internal::AnyHash
|
|
2012
|
+
)
|
|
2013
|
+
end
|
|
2014
|
+
|
|
2015
|
+
# The number of tokens (images and text) in the input prompt.
|
|
2016
|
+
sig { returns(Integer) }
|
|
2017
|
+
attr_accessor :input_tokens
|
|
2018
|
+
|
|
2019
|
+
# The input tokens detailed information for the image generation.
|
|
2020
|
+
sig { returns(OpenAI::Responses::Response::ToolUsage::ImageGen::InputTokensDetails) }
|
|
2021
|
+
attr_reader :input_tokens_details
|
|
2022
|
+
|
|
2023
|
+
sig {
|
|
2024
|
+
params(input_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::InputTokensDetails::OrHash)
|
|
2025
|
+
.void
|
|
2026
|
+
}
|
|
2027
|
+
attr_writer :input_tokens_details
|
|
2028
|
+
|
|
2029
|
+
# The number of output tokens generated by the model.
|
|
2030
|
+
sig { returns(Integer) }
|
|
2031
|
+
attr_accessor :output_tokens
|
|
2032
|
+
|
|
2033
|
+
# The total number of tokens (images and text) used for the image generation.
|
|
2034
|
+
sig { returns(Integer) }
|
|
2035
|
+
attr_accessor :total_tokens
|
|
2036
|
+
|
|
2037
|
+
sig { returns(T.nilable(Integer)) }
|
|
2038
|
+
attr_reader :cached_tokens
|
|
2039
|
+
|
|
2040
|
+
sig { params(cached_tokens: Integer).void }
|
|
2041
|
+
attr_writer :cached_tokens
|
|
2042
|
+
|
|
2043
|
+
sig { returns(T.nilable(OpenAI::Responses::Response::ToolUsage::ImageGen::CachedTokensDetails)) }
|
|
2044
|
+
attr_reader :cached_tokens_details
|
|
2045
|
+
|
|
2046
|
+
sig {
|
|
2047
|
+
params(
|
|
2048
|
+
cached_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::CachedTokensDetails::OrHash
|
|
2049
|
+
)
|
|
2050
|
+
.void
|
|
2051
|
+
}
|
|
2052
|
+
attr_writer :cached_tokens_details
|
|
2053
|
+
|
|
2054
|
+
# The output token details for the image generation.
|
|
2055
|
+
sig { returns(T.nilable(OpenAI::Responses::Response::ToolUsage::ImageGen::OutputTokensDetails)) }
|
|
2056
|
+
attr_reader :output_tokens_details
|
|
2057
|
+
|
|
2058
|
+
sig {
|
|
2059
|
+
params(
|
|
2060
|
+
output_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::OutputTokensDetails::OrHash
|
|
2061
|
+
)
|
|
2062
|
+
.void
|
|
2063
|
+
}
|
|
2064
|
+
attr_writer :output_tokens_details
|
|
2065
|
+
|
|
2066
|
+
# Aggregated usage statistics for image generation tool calls.
|
|
2067
|
+
sig do
|
|
2068
|
+
params(
|
|
2069
|
+
|
|
2070
|
+
input_tokens: Integer,
|
|
2071
|
+
|
|
2072
|
+
input_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::InputTokensDetails::OrHash,
|
|
2073
|
+
|
|
2074
|
+
output_tokens: Integer,
|
|
2075
|
+
|
|
2076
|
+
total_tokens: Integer,
|
|
2077
|
+
|
|
2078
|
+
cached_tokens: Integer,
|
|
2079
|
+
|
|
2080
|
+
cached_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::CachedTokensDetails::OrHash,
|
|
2081
|
+
|
|
2082
|
+
output_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::OutputTokensDetails::OrHash
|
|
2083
|
+
)
|
|
2084
|
+
.returns(T.attached_class)
|
|
2085
|
+
end
|
|
2086
|
+
def self.new(
|
|
2087
|
+
|
|
2088
|
+
# The number of tokens (images and text) in the input prompt.
|
|
2089
|
+
input_tokens:,
|
|
2090
|
+
|
|
2091
|
+
# The input tokens detailed information for the image generation.
|
|
2092
|
+
input_tokens_details:,
|
|
2093
|
+
|
|
2094
|
+
# The number of output tokens generated by the model.
|
|
2095
|
+
output_tokens:,
|
|
2096
|
+
|
|
2097
|
+
# The total number of tokens (images and text) used for the image generation.
|
|
2098
|
+
total_tokens:,
|
|
2099
|
+
|
|
2100
|
+
cached_tokens: nil,
|
|
2101
|
+
|
|
2102
|
+
cached_tokens_details: nil,
|
|
2103
|
+
|
|
2104
|
+
# The output token details for the image generation.
|
|
2105
|
+
|
|
2106
|
+
output_tokens_details: nil
|
|
2107
|
+
)
|
|
2108
|
+
end
|
|
2109
|
+
|
|
2110
|
+
sig do
|
|
2111
|
+
override.returns(
|
|
2112
|
+
{
|
|
2113
|
+
input_tokens: Integer,
|
|
2114
|
+
input_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::InputTokensDetails,
|
|
2115
|
+
output_tokens: Integer,
|
|
2116
|
+
total_tokens: Integer,
|
|
2117
|
+
cached_tokens: Integer,
|
|
2118
|
+
cached_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::CachedTokensDetails,
|
|
2119
|
+
output_tokens_details: OpenAI::Responses::Response::ToolUsage::ImageGen::OutputTokensDetails
|
|
2120
|
+
}
|
|
2121
|
+
)
|
|
2122
|
+
end
|
|
2123
|
+
def to_hash
|
|
2124
|
+
end
|
|
2125
|
+
|
|
2126
|
+
class InputTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
2127
|
+
OrHash = T.type_alias do
|
|
2128
|
+
T.any(
|
|
2129
|
+
OpenAI::Responses::Response::ToolUsage::ImageGen::InputTokensDetails,
|
|
2130
|
+
OpenAI::Internal::AnyHash
|
|
2131
|
+
)
|
|
2132
|
+
end
|
|
2133
|
+
|
|
2134
|
+
# The number of image tokens in the input prompt.
|
|
2135
|
+
sig { returns(Integer) }
|
|
2136
|
+
attr_accessor :image_tokens
|
|
2137
|
+
|
|
2138
|
+
# The number of text tokens in the input prompt.
|
|
2139
|
+
sig { returns(Integer) }
|
|
2140
|
+
attr_accessor :text_tokens
|
|
2141
|
+
|
|
2142
|
+
# The input tokens detailed information for the image generation.
|
|
2143
|
+
sig do
|
|
2144
|
+
params(
|
|
2145
|
+
|
|
2146
|
+
image_tokens: Integer,
|
|
2147
|
+
|
|
2148
|
+
text_tokens: Integer
|
|
2149
|
+
)
|
|
2150
|
+
.returns(T.attached_class)
|
|
2151
|
+
end
|
|
2152
|
+
def self.new(
|
|
2153
|
+
|
|
2154
|
+
# The number of image tokens in the input prompt.
|
|
2155
|
+
image_tokens:,
|
|
2156
|
+
|
|
2157
|
+
# The number of text tokens in the input prompt.
|
|
2158
|
+
|
|
2159
|
+
text_tokens:
|
|
2160
|
+
)
|
|
2161
|
+
end
|
|
2162
|
+
|
|
2163
|
+
sig do
|
|
2164
|
+
override.returns(
|
|
2165
|
+
{image_tokens: Integer, text_tokens: Integer}
|
|
2166
|
+
)
|
|
2167
|
+
end
|
|
2168
|
+
def to_hash
|
|
2169
|
+
end
|
|
2170
|
+
|
|
2171
|
+
end
|
|
2172
|
+
|
|
2173
|
+
class CachedTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
2174
|
+
OrHash = T.type_alias do
|
|
2175
|
+
T.any(
|
|
2176
|
+
OpenAI::Responses::Response::ToolUsage::ImageGen::CachedTokensDetails,
|
|
2177
|
+
OpenAI::Internal::AnyHash
|
|
2178
|
+
)
|
|
2179
|
+
end
|
|
2180
|
+
|
|
2181
|
+
sig { returns(Integer) }
|
|
2182
|
+
attr_accessor :cached_image_tokens
|
|
2183
|
+
|
|
2184
|
+
sig { returns(Integer) }
|
|
2185
|
+
attr_accessor :cached_text_tokens
|
|
2186
|
+
|
|
2187
|
+
sig do
|
|
2188
|
+
params(
|
|
2189
|
+
|
|
2190
|
+
cached_image_tokens: Integer,
|
|
2191
|
+
|
|
2192
|
+
cached_text_tokens: Integer
|
|
2193
|
+
)
|
|
2194
|
+
.returns(T.attached_class)
|
|
2195
|
+
end
|
|
2196
|
+
def self.new(
|
|
2197
|
+
|
|
2198
|
+
cached_image_tokens:,
|
|
2199
|
+
|
|
2200
|
+
cached_text_tokens:
|
|
2201
|
+
)
|
|
2202
|
+
end
|
|
2203
|
+
|
|
2204
|
+
sig do
|
|
2205
|
+
override.returns(
|
|
2206
|
+
{cached_image_tokens: Integer, cached_text_tokens: Integer}
|
|
2207
|
+
)
|
|
2208
|
+
end
|
|
2209
|
+
def to_hash
|
|
2210
|
+
end
|
|
2211
|
+
|
|
2212
|
+
end
|
|
2213
|
+
|
|
2214
|
+
class OutputTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
2215
|
+
OrHash = T.type_alias do
|
|
2216
|
+
T.any(
|
|
2217
|
+
OpenAI::Responses::Response::ToolUsage::ImageGen::OutputTokensDetails,
|
|
2218
|
+
OpenAI::Internal::AnyHash
|
|
2219
|
+
)
|
|
2220
|
+
end
|
|
2221
|
+
|
|
2222
|
+
# The number of image output tokens generated by the model.
|
|
2223
|
+
sig { returns(Integer) }
|
|
2224
|
+
attr_accessor :image_tokens
|
|
2225
|
+
|
|
2226
|
+
# The number of text output tokens generated by the model.
|
|
2227
|
+
sig { returns(Integer) }
|
|
2228
|
+
attr_accessor :text_tokens
|
|
2229
|
+
|
|
2230
|
+
# The output token details for the image generation.
|
|
2231
|
+
sig do
|
|
2232
|
+
params(
|
|
2233
|
+
|
|
2234
|
+
image_tokens: Integer,
|
|
2235
|
+
|
|
2236
|
+
text_tokens: Integer
|
|
2237
|
+
)
|
|
2238
|
+
.returns(T.attached_class)
|
|
2239
|
+
end
|
|
2240
|
+
def self.new(
|
|
2241
|
+
|
|
2242
|
+
# The number of image output tokens generated by the model.
|
|
2243
|
+
image_tokens:,
|
|
2244
|
+
|
|
2245
|
+
# The number of text output tokens generated by the model.
|
|
2246
|
+
|
|
2247
|
+
text_tokens:
|
|
2248
|
+
)
|
|
2249
|
+
end
|
|
2250
|
+
|
|
2251
|
+
sig do
|
|
2252
|
+
override.returns(
|
|
2253
|
+
{image_tokens: Integer, text_tokens: Integer}
|
|
2254
|
+
)
|
|
2255
|
+
end
|
|
2256
|
+
def to_hash
|
|
2257
|
+
end
|
|
2258
|
+
|
|
2259
|
+
end
|
|
2260
|
+
end
|
|
2261
|
+
|
|
2262
|
+
class WebSearch < OpenAI::Internal::Type::BaseModel
|
|
2263
|
+
OrHash = T.type_alias do
|
|
2264
|
+
T.any(
|
|
2265
|
+
OpenAI::Responses::Response::ToolUsage::WebSearch,
|
|
2266
|
+
OpenAI::Internal::AnyHash
|
|
2267
|
+
)
|
|
2268
|
+
end
|
|
2269
|
+
|
|
2270
|
+
# The number of billable web search requests issued.
|
|
2271
|
+
sig { returns(Integer) }
|
|
2272
|
+
attr_accessor :num_requests
|
|
2273
|
+
|
|
2274
|
+
# Aggregated billable usage statistics for web search tool calls.
|
|
2275
|
+
sig do
|
|
2276
|
+
params(
|
|
2277
|
+
|
|
2278
|
+
num_requests: Integer
|
|
2279
|
+
)
|
|
2280
|
+
.returns(T.attached_class)
|
|
2281
|
+
end
|
|
2282
|
+
def self.new(
|
|
2283
|
+
|
|
2284
|
+
# The number of billable web search requests issued.
|
|
2285
|
+
|
|
2286
|
+
num_requests:
|
|
2287
|
+
)
|
|
2288
|
+
end
|
|
2289
|
+
|
|
2290
|
+
sig do
|
|
2291
|
+
override.returns(
|
|
2292
|
+
{num_requests: Integer}
|
|
2293
|
+
)
|
|
2294
|
+
end
|
|
2295
|
+
def to_hash
|
|
2296
|
+
end
|
|
2297
|
+
|
|
2298
|
+
end
|
|
2299
|
+
end
|
|
2300
|
+
|
|
1907
2301
|
# The truncation strategy to use for the model response.
|
|
1908
2302
|
#
|
|
1909
2303
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
@@ -29,8 +29,15 @@ module OpenAI
|
|
|
29
29
|
sig { params(reasoning: OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning::OrHash).void }
|
|
30
30
|
attr_writer :reasoning
|
|
31
31
|
|
|
32
|
-
#
|
|
33
|
-
|
|
32
|
+
# The text output configuration for subsequent responses.
|
|
33
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponseConfigurationUpdateItem::Text)) }
|
|
34
|
+
attr_reader :text
|
|
35
|
+
|
|
36
|
+
sig { params(text: OpenAI::Responses::ResponseConfigurationUpdateItem::Text::OrHash).void }
|
|
37
|
+
attr_writer :text
|
|
38
|
+
|
|
39
|
+
# A configuration update for subsequent responses. Each setting stays in effect
|
|
40
|
+
# until a later update replaces that setting.
|
|
34
41
|
sig do
|
|
35
42
|
params(
|
|
36
43
|
|
|
@@ -38,6 +45,8 @@ module OpenAI
|
|
|
38
45
|
|
|
39
46
|
reasoning: OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning::OrHash,
|
|
40
47
|
|
|
48
|
+
text: OpenAI::Responses::ResponseConfigurationUpdateItem::Text::OrHash,
|
|
49
|
+
|
|
41
50
|
type: Symbol
|
|
42
51
|
)
|
|
43
52
|
.returns(T.attached_class)
|
|
@@ -50,6 +59,9 @@ module OpenAI
|
|
|
50
59
|
# The reasoning configuration applied by this update.
|
|
51
60
|
reasoning: nil,
|
|
52
61
|
|
|
62
|
+
# The text output configuration for subsequent responses.
|
|
63
|
+
text: nil,
|
|
64
|
+
|
|
53
65
|
# The item type. Always `configuration_update`.
|
|
54
66
|
|
|
55
67
|
type: :configuration_update
|
|
@@ -58,7 +70,12 @@ module OpenAI
|
|
|
58
70
|
|
|
59
71
|
sig do
|
|
60
72
|
override.returns(
|
|
61
|
-
{
|
|
73
|
+
{
|
|
74
|
+
id: String,
|
|
75
|
+
type: Symbol,
|
|
76
|
+
reasoning: OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning,
|
|
77
|
+
text: OpenAI::Responses::ResponseConfigurationUpdateItem::Text
|
|
78
|
+
}
|
|
62
79
|
)
|
|
63
80
|
end
|
|
64
81
|
def to_hash
|
|
@@ -104,6 +121,62 @@ module OpenAI
|
|
|
104
121
|
|
|
105
122
|
end
|
|
106
123
|
|
|
124
|
+
class Text < OpenAI::Internal::Type::BaseModel
|
|
125
|
+
OrHash = T.type_alias do
|
|
126
|
+
T.any(
|
|
127
|
+
OpenAI::Responses::ResponseConfigurationUpdateItem::Text,
|
|
128
|
+
OpenAI::Internal::AnyHash
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
133
|
+
sig { returns(OpenAI::Responses::ResponseConfigurationUpdateItem::Text::Format::Variants) }
|
|
134
|
+
attr_accessor :format_
|
|
135
|
+
|
|
136
|
+
# The text output configuration for subsequent responses.
|
|
137
|
+
sig do
|
|
138
|
+
params(
|
|
139
|
+
|
|
140
|
+
format_: T.any(
|
|
141
|
+
OpenAI::ResponseFormatText::OrHash,
|
|
142
|
+
OpenAI::Responses::ResponseFormatTextJSONSchemaConfig::OrHash
|
|
143
|
+
)
|
|
144
|
+
)
|
|
145
|
+
.returns(T.attached_class)
|
|
146
|
+
end
|
|
147
|
+
def self.new(
|
|
148
|
+
|
|
149
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
150
|
+
|
|
151
|
+
format_:
|
|
152
|
+
)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
override.returns(
|
|
157
|
+
{format_: OpenAI::Responses::ResponseConfigurationUpdateItem::Text::Format::Variants}
|
|
158
|
+
)
|
|
159
|
+
end
|
|
160
|
+
def to_hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
164
|
+
module Format
|
|
165
|
+
extend OpenAI::Internal::Type::Union
|
|
166
|
+
|
|
167
|
+
Variants = T.type_alias {
|
|
168
|
+
T.any(OpenAI::ResponseFormatText, OpenAI::Responses::ResponseFormatTextJSONSchemaConfig)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
sig {
|
|
172
|
+
override.returns(T::Array[OpenAI::Responses::ResponseConfigurationUpdateItem::Text::Format::Variants])
|
|
173
|
+
}
|
|
174
|
+
def self.variants
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
107
180
|
end
|
|
108
181
|
|
|
109
182
|
end
|
|
@@ -29,9 +29,15 @@ module OpenAI
|
|
|
29
29
|
sig { params(reasoning: OpenAI::Responses::ResponseConfigurationUpdateItemParam::Reasoning::OrHash).void }
|
|
30
30
|
attr_writer :reasoning
|
|
31
31
|
|
|
32
|
-
#
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
# The text output configuration for subsequent responses.
|
|
33
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponseConfigurationUpdateItemParam::Text)) }
|
|
34
|
+
attr_reader :text
|
|
35
|
+
|
|
36
|
+
sig { params(text: OpenAI::Responses::ResponseConfigurationUpdateItemParam::Text::OrHash).void }
|
|
37
|
+
attr_writer :text
|
|
38
|
+
|
|
39
|
+
# An update to the conversation's response configuration. Supply reasoning, text,
|
|
40
|
+
# or both. Each setting stays in effect until a later update replaces it.
|
|
35
41
|
sig do
|
|
36
42
|
params(
|
|
37
43
|
|
|
@@ -39,6 +45,8 @@ module OpenAI
|
|
|
39
45
|
|
|
40
46
|
reasoning: OpenAI::Responses::ResponseConfigurationUpdateItemParam::Reasoning::OrHash,
|
|
41
47
|
|
|
48
|
+
text: OpenAI::Responses::ResponseConfigurationUpdateItemParam::Text::OrHash,
|
|
49
|
+
|
|
42
50
|
type: Symbol
|
|
43
51
|
)
|
|
44
52
|
.returns(T.attached_class)
|
|
@@ -51,6 +59,9 @@ module OpenAI
|
|
|
51
59
|
# Updates to reasoning configuration. Only effort is supported.
|
|
52
60
|
reasoning: nil,
|
|
53
61
|
|
|
62
|
+
# The text output configuration for subsequent responses.
|
|
63
|
+
text: nil,
|
|
64
|
+
|
|
54
65
|
# The item type. Always `configuration_update`.
|
|
55
66
|
|
|
56
67
|
type: :configuration_update
|
|
@@ -62,7 +73,8 @@ module OpenAI
|
|
|
62
73
|
{
|
|
63
74
|
type: Symbol,
|
|
64
75
|
id: T.nilable(String),
|
|
65
|
-
reasoning: OpenAI::Responses::ResponseConfigurationUpdateItemParam::Reasoning
|
|
76
|
+
reasoning: OpenAI::Responses::ResponseConfigurationUpdateItemParam::Reasoning,
|
|
77
|
+
text: OpenAI::Responses::ResponseConfigurationUpdateItemParam::Text
|
|
66
78
|
}
|
|
67
79
|
)
|
|
68
80
|
end
|
|
@@ -109,6 +121,64 @@ module OpenAI
|
|
|
109
121
|
|
|
110
122
|
end
|
|
111
123
|
|
|
124
|
+
class Text < OpenAI::Internal::Type::BaseModel
|
|
125
|
+
OrHash = T.type_alias do
|
|
126
|
+
T.any(
|
|
127
|
+
OpenAI::Responses::ResponseConfigurationUpdateItemParam::Text,
|
|
128
|
+
OpenAI::Internal::AnyHash
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
133
|
+
sig { returns(T.any(OpenAI::ResponseFormatText, OpenAI::Responses::ResponseFormatTextJSONSchemaConfig)) }
|
|
134
|
+
attr_accessor :format_
|
|
135
|
+
|
|
136
|
+
# The text output configuration for subsequent responses.
|
|
137
|
+
sig do
|
|
138
|
+
params(
|
|
139
|
+
|
|
140
|
+
format_: T.any(
|
|
141
|
+
OpenAI::ResponseFormatText::OrHash,
|
|
142
|
+
OpenAI::Responses::ResponseFormatTextJSONSchemaConfig::OrHash
|
|
143
|
+
)
|
|
144
|
+
)
|
|
145
|
+
.returns(T.attached_class)
|
|
146
|
+
end
|
|
147
|
+
def self.new(
|
|
148
|
+
|
|
149
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
150
|
+
|
|
151
|
+
format_:
|
|
152
|
+
)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
override.returns(
|
|
157
|
+
{format_: T.any(OpenAI::ResponseFormatText, OpenAI::Responses::ResponseFormatTextJSONSchemaConfig)}
|
|
158
|
+
)
|
|
159
|
+
end
|
|
160
|
+
def to_hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
164
|
+
module Format
|
|
165
|
+
extend OpenAI::Internal::Type::Union
|
|
166
|
+
|
|
167
|
+
Variants = T.type_alias {
|
|
168
|
+
T.any(OpenAI::ResponseFormatText, OpenAI::Responses::ResponseFormatTextJSONSchemaConfig)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
sig {
|
|
172
|
+
override.returns(
|
|
173
|
+
T::Array[OpenAI::Responses::ResponseConfigurationUpdateItemParam::Text::Format::Variants]
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
def self.variants
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
112
182
|
end
|
|
113
183
|
|
|
114
184
|
end
|
|
@@ -1296,8 +1296,8 @@ module OpenAI
|
|
|
1296
1296
|
|
|
1297
1297
|
# Control how much effort the model will exert to match the style and features,
|
|
1298
1298
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1299
|
-
# `gpt-image-1
|
|
1300
|
-
#
|
|
1299
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1300
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1301
1301
|
sig {
|
|
1302
1302
|
returns(
|
|
1303
1303
|
T.nilable(
|
|
@@ -1517,8 +1517,8 @@ module OpenAI
|
|
|
1517
1517
|
|
|
1518
1518
|
# Control how much effort the model will exert to match the style and features,
|
|
1519
1519
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1520
|
-
# `gpt-image-1
|
|
1521
|
-
#
|
|
1520
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1521
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1522
1522
|
input_fidelity: nil,
|
|
1523
1523
|
|
|
1524
1524
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -1678,8 +1678,8 @@ module OpenAI
|
|
|
1678
1678
|
|
|
1679
1679
|
# Control how much effort the model will exert to match the style and features,
|
|
1680
1680
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1681
|
-
# `gpt-image-1
|
|
1682
|
-
#
|
|
1681
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1682
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1683
1683
|
module InputFidelity
|
|
1684
1684
|
extend OpenAI::Internal::Type::Enum
|
|
1685
1685
|
|