openai 0.113.0 → 0.115.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 +54 -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/auth/subject_token_providers/azure_managed_identity_token_provider.rb +10 -8
- data/lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb +8 -7
- 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_file.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_file_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_item.rb +2 -3
- data/lib/openai/models/beta/beta_response_input_text.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_text_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_item.rb +11 -11
- data/lib/openai/models/beta/beta_response_output_item.rb +9 -9
- 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/chat_completion_content_part.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_text.rb +9 -9
- data/lib/openai/models/chat_model.rb +6 -0
- data/lib/openai/models/conversations/computer_screenshot_content.rb +9 -9
- 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_file.rb +9 -9
- data/lib/openai/models/responses/response_input_file_content.rb +9 -9
- data/lib/openai/models/responses/response_input_image.rb +9 -9
- data/lib/openai/models/responses/response_input_image_content.rb +9 -9
- data/lib/openai/models/responses/response_input_item.rb +2 -3
- data/lib/openai/models/responses/response_input_text.rb +9 -9
- data/lib/openai/models/responses/response_input_text_content.rb +9 -9
- 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_input_file.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_file_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_item.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_output_item.rbi +9 -9
- 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/chat/chat_completion_content_part.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +9 -9
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +9 -9
- 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_input_file.rbi +9 -9
- data/rbi/openai/models/responses/response_input_file_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text_content.rbi +9 -9
- 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_input_file.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_file_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_image.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_image_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_text.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_text_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_item.rbs +9 -9
- data/sig/openai/models/beta/beta_response_output_item.rbs +9 -9
- 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/chat/chat_completion_content_part.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +9 -9
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +9 -9
- 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_input_file.rbs +9 -9
- data/sig/openai/models/responses/response_input_file_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_image.rbs +9 -9
- data/sig/openai/models/responses/response_input_image_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_text.rbs +9 -9
- data/sig/openai/models/responses/response_input_text_content.rbs +6 -6
- 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 +25 -1
|
@@ -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
|
|
@@ -54,9 +54,9 @@ module OpenAI
|
|
|
54
54
|
sig { params(filename: String).void }
|
|
55
55
|
attr_writer :filename
|
|
56
56
|
|
|
57
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
58
|
-
#
|
|
59
|
-
# token block.
|
|
57
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
58
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
59
|
+
# not rounded to a token block.
|
|
60
60
|
sig { returns(T.nilable(OpenAI::Responses::ResponseInputFile::PromptCacheBreakpoint)) }
|
|
61
61
|
attr_reader :prompt_cache_breakpoint
|
|
62
62
|
|
|
@@ -106,9 +106,9 @@ module OpenAI
|
|
|
106
106
|
# The name of the file to be sent to the model.
|
|
107
107
|
filename: nil,
|
|
108
108
|
|
|
109
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
110
|
-
#
|
|
111
|
-
# token block.
|
|
109
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
110
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
111
|
+
# not rounded to a token block.
|
|
112
112
|
prompt_cache_breakpoint: nil,
|
|
113
113
|
|
|
114
114
|
# The type of the input item. Always `input_file`.
|
|
@@ -172,9 +172,9 @@ module OpenAI
|
|
|
172
172
|
sig { params(ttl: OpenAI::Responses::ResponseInputFile::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
173
173
|
attr_writer :ttl
|
|
174
174
|
|
|
175
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
176
|
-
#
|
|
177
|
-
# token block.
|
|
175
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
176
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
177
|
+
# not rounded to a token block.
|
|
178
178
|
sig do
|
|
179
179
|
params(
|
|
180
180
|
|
|
@@ -45,9 +45,9 @@ module OpenAI
|
|
|
45
45
|
sig { returns(T.nilable(String)) }
|
|
46
46
|
attr_accessor :filename
|
|
47
47
|
|
|
48
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
49
|
-
#
|
|
50
|
-
# token block.
|
|
48
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
49
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
50
|
+
# not rounded to a token block.
|
|
51
51
|
sig { returns(T.nilable(OpenAI::Responses::ResponseInputFileContent::PromptCacheBreakpoint)) }
|
|
52
52
|
attr_reader :prompt_cache_breakpoint
|
|
53
53
|
|
|
@@ -104,9 +104,9 @@ module OpenAI
|
|
|
104
104
|
# The name of the file to be sent to the model.
|
|
105
105
|
filename: nil,
|
|
106
106
|
|
|
107
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
108
|
-
#
|
|
109
|
-
# token block.
|
|
107
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
108
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
109
|
+
# not rounded to a token block.
|
|
110
110
|
prompt_cache_breakpoint: nil,
|
|
111
111
|
|
|
112
112
|
# The type of the input item. Always `input_file`.
|
|
@@ -170,9 +170,9 @@ module OpenAI
|
|
|
170
170
|
sig { params(ttl: OpenAI::Responses::ResponseInputFileContent::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
171
171
|
attr_writer :ttl
|
|
172
172
|
|
|
173
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
174
|
-
#
|
|
175
|
-
# token block.
|
|
173
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
174
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
175
|
+
# not rounded to a token block.
|
|
176
176
|
sig do
|
|
177
177
|
params(
|
|
178
178
|
|
|
@@ -32,9 +32,9 @@ module OpenAI
|
|
|
32
32
|
sig { returns(T.nilable(String)) }
|
|
33
33
|
attr_accessor :image_url
|
|
34
34
|
|
|
35
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
36
|
-
#
|
|
37
|
-
# token block.
|
|
35
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
36
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
37
|
+
# not rounded to a token block.
|
|
38
38
|
sig { returns(T.nilable(OpenAI::Responses::ResponseInputImage::PromptCacheBreakpoint)) }
|
|
39
39
|
attr_reader :prompt_cache_breakpoint
|
|
40
40
|
|
|
@@ -73,9 +73,9 @@ module OpenAI
|
|
|
73
73
|
# encoded image in a data URL.
|
|
74
74
|
image_url: nil,
|
|
75
75
|
|
|
76
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
77
|
-
#
|
|
78
|
-
# token block.
|
|
76
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
77
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
78
|
+
# not rounded to a token block.
|
|
79
79
|
prompt_cache_breakpoint: nil,
|
|
80
80
|
|
|
81
81
|
# The type of the input item. Always `input_image`.
|
|
@@ -135,9 +135,9 @@ module OpenAI
|
|
|
135
135
|
sig { params(ttl: OpenAI::Responses::ResponseInputImage::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
136
136
|
attr_writer :ttl
|
|
137
137
|
|
|
138
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
139
|
-
#
|
|
140
|
-
# token block.
|
|
138
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
139
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
140
|
+
# not rounded to a token block.
|
|
141
141
|
sig do
|
|
142
142
|
params(
|
|
143
143
|
|
|
@@ -32,9 +32,9 @@ module OpenAI
|
|
|
32
32
|
sig { returns(T.nilable(String)) }
|
|
33
33
|
attr_accessor :image_url
|
|
34
34
|
|
|
35
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
36
|
-
#
|
|
37
|
-
# token block.
|
|
35
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
36
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
37
|
+
# not rounded to a token block.
|
|
38
38
|
sig { returns(T.nilable(OpenAI::Responses::ResponseInputImageContent::PromptCacheBreakpoint)) }
|
|
39
39
|
attr_reader :prompt_cache_breakpoint
|
|
40
40
|
|
|
@@ -80,9 +80,9 @@ module OpenAI
|
|
|
80
80
|
# encoded image in a data URL.
|
|
81
81
|
image_url: nil,
|
|
82
82
|
|
|
83
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
84
|
-
#
|
|
85
|
-
# token block.
|
|
83
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
84
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
85
|
+
# not rounded to a token block.
|
|
86
86
|
prompt_cache_breakpoint: nil,
|
|
87
87
|
|
|
88
88
|
# The type of the input item. Always `input_image`.
|
|
@@ -144,9 +144,9 @@ module OpenAI
|
|
|
144
144
|
sig { params(ttl: OpenAI::Responses::ResponseInputImageContent::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
145
145
|
attr_writer :ttl
|
|
146
146
|
|
|
147
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
148
|
-
#
|
|
149
|
-
# token block.
|
|
147
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
148
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
149
|
+
# not rounded to a token block.
|
|
150
150
|
sig do
|
|
151
151
|
params(
|
|
152
152
|
|
|
@@ -22,9 +22,9 @@ module OpenAI
|
|
|
22
22
|
sig { returns(Symbol) }
|
|
23
23
|
attr_accessor :type
|
|
24
24
|
|
|
25
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
26
|
-
#
|
|
27
|
-
# token block.
|
|
25
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
26
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
27
|
+
# not rounded to a token block.
|
|
28
28
|
sig { returns(T.nilable(OpenAI::Responses::ResponseInputText::PromptCacheBreakpoint)) }
|
|
29
29
|
attr_reader :prompt_cache_breakpoint
|
|
30
30
|
|
|
@@ -50,9 +50,9 @@ module OpenAI
|
|
|
50
50
|
# The text input to the model.
|
|
51
51
|
text:,
|
|
52
52
|
|
|
53
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
54
|
-
#
|
|
55
|
-
# token block.
|
|
53
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
54
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
55
|
+
# not rounded to a token block.
|
|
56
56
|
prompt_cache_breakpoint: nil,
|
|
57
57
|
|
|
58
58
|
# The type of the input item. Always `input_text`.
|
|
@@ -92,9 +92,9 @@ module OpenAI
|
|
|
92
92
|
sig { params(ttl: OpenAI::Responses::ResponseInputText::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
93
93
|
attr_writer :ttl
|
|
94
94
|
|
|
95
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
96
|
-
#
|
|
97
|
-
# token block.
|
|
95
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
96
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
97
|
+
# not rounded to a token block.
|
|
98
98
|
sig do
|
|
99
99
|
params(
|
|
100
100
|
|
|
@@ -22,9 +22,9 @@ module OpenAI
|
|
|
22
22
|
sig { returns(Symbol) }
|
|
23
23
|
attr_accessor :type
|
|
24
24
|
|
|
25
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
26
|
-
#
|
|
27
|
-
# token block.
|
|
25
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
26
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
27
|
+
# not rounded to a token block.
|
|
28
28
|
sig { returns(T.nilable(OpenAI::Responses::ResponseInputTextContent::PromptCacheBreakpoint)) }
|
|
29
29
|
attr_reader :prompt_cache_breakpoint
|
|
30
30
|
|
|
@@ -57,9 +57,9 @@ module OpenAI
|
|
|
57
57
|
# The text input to the model.
|
|
58
58
|
text:,
|
|
59
59
|
|
|
60
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
61
|
-
#
|
|
62
|
-
# token block.
|
|
60
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
61
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
62
|
+
# not rounded to a token block.
|
|
63
63
|
prompt_cache_breakpoint: nil,
|
|
64
64
|
|
|
65
65
|
# The type of the input item. Always `input_text`.
|
|
@@ -99,9 +99,9 @@ module OpenAI
|
|
|
99
99
|
sig { params(ttl: OpenAI::Responses::ResponseInputTextContent::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
100
100
|
attr_writer :ttl
|
|
101
101
|
|
|
102
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
103
|
-
#
|
|
104
|
-
# token block.
|
|
102
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
103
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
104
|
+
# not rounded to a token block.
|
|
105
105
|
sig do
|
|
106
106
|
params(
|
|
107
107
|
|
|
@@ -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
|
|
|
@@ -56,6 +56,15 @@ module OpenAI
|
|
|
56
56
|
sig { returns(T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam))) }
|
|
57
57
|
attr_accessor :conversation
|
|
58
58
|
|
|
59
|
+
# Whether to generate output for this response. Defaults to true when omitted. Set
|
|
60
|
+
# to false to prepare request state without model output; the response ID can be
|
|
61
|
+
# used as previous_response_id on a later turn.
|
|
62
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
63
|
+
attr_reader :generate
|
|
64
|
+
|
|
65
|
+
sig { params(generate: T::Boolean).void }
|
|
66
|
+
attr_writer :generate
|
|
67
|
+
|
|
59
68
|
# Specify additional output data to include in the model response. Currently
|
|
60
69
|
# supported values are:
|
|
61
70
|
#
|
|
@@ -496,6 +505,8 @@ module OpenAI
|
|
|
496
505
|
|
|
497
506
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
|
|
498
507
|
|
|
508
|
+
generate: T::Boolean,
|
|
509
|
+
|
|
499
510
|
include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
|
|
500
511
|
|
|
501
512
|
input: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants,
|
|
@@ -607,6 +618,11 @@ module OpenAI
|
|
|
607
618
|
# response completes.
|
|
608
619
|
conversation: nil,
|
|
609
620
|
|
|
621
|
+
# Whether to generate output for this response. Defaults to true when omitted. Set
|
|
622
|
+
# to false to prepare request state without model output; the response ID can be
|
|
623
|
+
# used as previous_response_id on a later turn.
|
|
624
|
+
generate: nil,
|
|
625
|
+
|
|
610
626
|
# Specify additional output data to include in the model response. Currently
|
|
611
627
|
# supported values are:
|
|
612
628
|
#
|
|
@@ -870,6 +886,7 @@ module OpenAI
|
|
|
870
886
|
T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]
|
|
871
887
|
),
|
|
872
888
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam)),
|
|
889
|
+
generate: T.nilable(T::Boolean),
|
|
873
890
|
include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
|
|
874
891
|
input: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants),
|
|
875
892
|
instructions: T.nilable(String),
|
|
@@ -979,8 +979,8 @@ module OpenAI
|
|
|
979
979
|
|
|
980
980
|
# Control how much effort the model will exert to match the style and features,
|
|
981
981
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
982
|
-
# `gpt-image-1
|
|
983
|
-
#
|
|
982
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
983
|
+
# this parameter. Defaults to `low` on supported models.
|
|
984
984
|
sig { returns(T.nilable(OpenAI::Responses::Tool::ImageGeneration::InputFidelity::OrSymbol)) }
|
|
985
985
|
attr_accessor :input_fidelity
|
|
986
986
|
|
|
@@ -1110,8 +1110,8 @@ module OpenAI
|
|
|
1110
1110
|
|
|
1111
1111
|
# Control how much effort the model will exert to match the style and features,
|
|
1112
1112
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1113
|
-
# `gpt-image-1
|
|
1114
|
-
#
|
|
1113
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1114
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1115
1115
|
input_fidelity: nil,
|
|
1116
1116
|
|
|
1117
1117
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -1229,8 +1229,8 @@ module OpenAI
|
|
|
1229
1229
|
|
|
1230
1230
|
# Control how much effort the model will exert to match the style and features,
|
|
1231
1231
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1232
|
-
# `gpt-image-1
|
|
1233
|
-
#
|
|
1232
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1233
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1234
1234
|
module InputFidelity
|
|
1235
1235
|
extend OpenAI::Internal::Type::Enum
|
|
1236
1236
|
|