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
|
@@ -38,9 +38,15 @@ module OpenAI
|
|
|
38
38
|
sig { params(reasoning: OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning::OrHash).void }
|
|
39
39
|
attr_writer :reasoning
|
|
40
40
|
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
# The text output configuration for subsequent responses.
|
|
42
|
+
sig { returns(T.nilable(OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text)) }
|
|
43
|
+
attr_reader :text
|
|
44
|
+
|
|
45
|
+
sig { params(text: OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::OrHash).void }
|
|
46
|
+
attr_writer :text
|
|
47
|
+
|
|
48
|
+
# An update to the conversation's response configuration. Supply reasoning, text,
|
|
49
|
+
# or both. Each setting stays in effect until a later update replaces it.
|
|
44
50
|
sig do
|
|
45
51
|
params(
|
|
46
52
|
|
|
@@ -50,6 +56,8 @@ module OpenAI
|
|
|
50
56
|
|
|
51
57
|
reasoning: OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning::OrHash,
|
|
52
58
|
|
|
59
|
+
text: OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::OrHash,
|
|
60
|
+
|
|
53
61
|
type: Symbol
|
|
54
62
|
)
|
|
55
63
|
.returns(T.attached_class)
|
|
@@ -65,6 +73,9 @@ module OpenAI
|
|
|
65
73
|
# Updates to reasoning configuration. Only effort is supported.
|
|
66
74
|
reasoning: nil,
|
|
67
75
|
|
|
76
|
+
# The text output configuration for subsequent responses.
|
|
77
|
+
text: nil,
|
|
78
|
+
|
|
68
79
|
# The item type. Always `configuration_update`.
|
|
69
80
|
|
|
70
81
|
type: :configuration_update
|
|
@@ -77,7 +88,8 @@ module OpenAI
|
|
|
77
88
|
type: Symbol,
|
|
78
89
|
id: T.nilable(String),
|
|
79
90
|
agent: T.nilable(OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Agent),
|
|
80
|
-
reasoning: OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning
|
|
91
|
+
reasoning: OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning,
|
|
92
|
+
text: OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text
|
|
81
93
|
}
|
|
82
94
|
)
|
|
83
95
|
end
|
|
@@ -199,6 +211,115 @@ module OpenAI
|
|
|
199
211
|
end
|
|
200
212
|
end
|
|
201
213
|
|
|
214
|
+
class Text < OpenAI::Internal::Type::BaseModel
|
|
215
|
+
OrHash = T.type_alias do
|
|
216
|
+
T.any(
|
|
217
|
+
OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text,
|
|
218
|
+
OpenAI::Internal::AnyHash
|
|
219
|
+
)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
223
|
+
sig {
|
|
224
|
+
returns(
|
|
225
|
+
T.any(
|
|
226
|
+
OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text,
|
|
227
|
+
OpenAI::Beta::BetaResponseFormatTextJSONSchemaConfig
|
|
228
|
+
)
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
attr_accessor :format_
|
|
232
|
+
|
|
233
|
+
# The text output configuration for subsequent responses.
|
|
234
|
+
sig do
|
|
235
|
+
params(
|
|
236
|
+
|
|
237
|
+
format_: T.any(
|
|
238
|
+
OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text::OrHash,
|
|
239
|
+
OpenAI::Beta::BetaResponseFormatTextJSONSchemaConfig::OrHash
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
.returns(T.attached_class)
|
|
243
|
+
end
|
|
244
|
+
def self.new(
|
|
245
|
+
|
|
246
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
247
|
+
|
|
248
|
+
format_:
|
|
249
|
+
)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
sig do
|
|
253
|
+
override.returns(
|
|
254
|
+
{
|
|
255
|
+
format_: T.any(
|
|
256
|
+
OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text,
|
|
257
|
+
OpenAI::Beta::BetaResponseFormatTextJSONSchemaConfig
|
|
258
|
+
)
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
end
|
|
262
|
+
def to_hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Use a JSON schema for structured output or text to return to plain text.
|
|
266
|
+
module Format
|
|
267
|
+
extend OpenAI::Internal::Type::Union
|
|
268
|
+
|
|
269
|
+
Variants = T.type_alias {
|
|
270
|
+
T.any(
|
|
271
|
+
OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text,
|
|
272
|
+
OpenAI::Beta::BetaResponseFormatTextJSONSchemaConfig
|
|
273
|
+
)
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
class Text < OpenAI::Internal::Type::BaseModel
|
|
277
|
+
OrHash = T.type_alias do
|
|
278
|
+
T.any(
|
|
279
|
+
OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text,
|
|
280
|
+
OpenAI::Internal::AnyHash
|
|
281
|
+
)
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# The type of response format being defined. Always `text`.
|
|
285
|
+
sig { returns(Symbol) }
|
|
286
|
+
attr_accessor :type
|
|
287
|
+
|
|
288
|
+
# Default response format. Used to generate text responses.
|
|
289
|
+
sig do
|
|
290
|
+
params(
|
|
291
|
+
|
|
292
|
+
type: Symbol
|
|
293
|
+
)
|
|
294
|
+
.returns(T.attached_class)
|
|
295
|
+
end
|
|
296
|
+
def self.new(
|
|
297
|
+
|
|
298
|
+
# The type of response format being defined. Always `text`.
|
|
299
|
+
|
|
300
|
+
type: :text
|
|
301
|
+
)
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
sig do
|
|
305
|
+
override.returns(
|
|
306
|
+
{type: Symbol}
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
def to_hash
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
sig {
|
|
315
|
+
override.returns(T::Array[OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Variants])
|
|
316
|
+
}
|
|
317
|
+
def self.variants
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
|
|
202
323
|
end
|
|
203
324
|
|
|
204
325
|
end
|
|
@@ -56,9 +56,9 @@ module OpenAI
|
|
|
56
56
|
sig { params(filename: String).void }
|
|
57
57
|
attr_writer :filename
|
|
58
58
|
|
|
59
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
60
|
-
#
|
|
61
|
-
# token block.
|
|
59
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
60
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
61
|
+
# not rounded to a token block.
|
|
62
62
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponseInputFile::PromptCacheBreakpoint)) }
|
|
63
63
|
attr_reader :prompt_cache_breakpoint
|
|
64
64
|
|
|
@@ -108,9 +108,9 @@ module OpenAI
|
|
|
108
108
|
# The name of the file to be sent to the model.
|
|
109
109
|
filename: nil,
|
|
110
110
|
|
|
111
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
112
|
-
#
|
|
113
|
-
# token block.
|
|
111
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
112
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
113
|
+
# not rounded to a token block.
|
|
114
114
|
prompt_cache_breakpoint: nil,
|
|
115
115
|
|
|
116
116
|
# The type of the input item. Always `input_file`.
|
|
@@ -174,9 +174,9 @@ module OpenAI
|
|
|
174
174
|
sig { params(ttl: OpenAI::Beta::BetaResponseInputFile::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
175
175
|
attr_writer :ttl
|
|
176
176
|
|
|
177
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
178
|
-
#
|
|
179
|
-
# token block.
|
|
177
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
178
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
179
|
+
# not rounded to a token block.
|
|
180
180
|
sig do
|
|
181
181
|
params(
|
|
182
182
|
|
|
@@ -47,9 +47,9 @@ module OpenAI
|
|
|
47
47
|
sig { returns(T.nilable(String)) }
|
|
48
48
|
attr_accessor :filename
|
|
49
49
|
|
|
50
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
51
|
-
#
|
|
52
|
-
# token block.
|
|
50
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
51
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
52
|
+
# not rounded to a token block.
|
|
53
53
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponseInputFileContent::PromptCacheBreakpoint)) }
|
|
54
54
|
attr_reader :prompt_cache_breakpoint
|
|
55
55
|
|
|
@@ -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::Beta::BetaResponseInputFileContent::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
|
|
|
@@ -34,9 +34,9 @@ module OpenAI
|
|
|
34
34
|
sig { returns(T.nilable(String)) }
|
|
35
35
|
attr_accessor :image_url
|
|
36
36
|
|
|
37
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
38
|
-
#
|
|
39
|
-
# token block.
|
|
37
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
38
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
39
|
+
# not rounded to a token block.
|
|
40
40
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponseInputImage::PromptCacheBreakpoint)) }
|
|
41
41
|
attr_reader :prompt_cache_breakpoint
|
|
42
42
|
|
|
@@ -75,9 +75,9 @@ module OpenAI
|
|
|
75
75
|
# encoded image in a data URL.
|
|
76
76
|
image_url: nil,
|
|
77
77
|
|
|
78
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
79
|
-
#
|
|
80
|
-
# token block.
|
|
78
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
79
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
80
|
+
# not rounded to a token block.
|
|
81
81
|
prompt_cache_breakpoint: nil,
|
|
82
82
|
|
|
83
83
|
# The type of the input item. Always `input_image`.
|
|
@@ -137,9 +137,9 @@ module OpenAI
|
|
|
137
137
|
sig { params(ttl: OpenAI::Beta::BetaResponseInputImage::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
138
138
|
attr_writer :ttl
|
|
139
139
|
|
|
140
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
141
|
-
#
|
|
142
|
-
# token block.
|
|
140
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
141
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
142
|
+
# not rounded to a token block.
|
|
143
143
|
sig do
|
|
144
144
|
params(
|
|
145
145
|
|
|
@@ -34,9 +34,9 @@ module OpenAI
|
|
|
34
34
|
sig { returns(T.nilable(String)) }
|
|
35
35
|
attr_accessor :image_url
|
|
36
36
|
|
|
37
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
38
|
-
#
|
|
39
|
-
# token block.
|
|
37
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
38
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
39
|
+
# not rounded to a token block.
|
|
40
40
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponseInputImageContent::PromptCacheBreakpoint)) }
|
|
41
41
|
attr_reader :prompt_cache_breakpoint
|
|
42
42
|
|
|
@@ -82,9 +82,9 @@ module OpenAI
|
|
|
82
82
|
# encoded image in a data URL.
|
|
83
83
|
image_url: nil,
|
|
84
84
|
|
|
85
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
86
|
-
#
|
|
87
|
-
# token block.
|
|
85
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
86
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
87
|
+
# not rounded to a token block.
|
|
88
88
|
prompt_cache_breakpoint: nil,
|
|
89
89
|
|
|
90
90
|
# The type of the input item. Always `input_image`.
|
|
@@ -144,9 +144,9 @@ module OpenAI
|
|
|
144
144
|
sig { params(ttl: OpenAI::Beta::BetaResponseInputImageContent::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
|
|
|
@@ -24,9 +24,9 @@ module OpenAI
|
|
|
24
24
|
sig { returns(Symbol) }
|
|
25
25
|
attr_accessor :type
|
|
26
26
|
|
|
27
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
28
|
-
#
|
|
29
|
-
# token block.
|
|
27
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
28
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
29
|
+
# not rounded to a token block.
|
|
30
30
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponseInputText::PromptCacheBreakpoint)) }
|
|
31
31
|
attr_reader :prompt_cache_breakpoint
|
|
32
32
|
|
|
@@ -52,9 +52,9 @@ module OpenAI
|
|
|
52
52
|
# The text input to the model.
|
|
53
53
|
text:,
|
|
54
54
|
|
|
55
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
56
|
-
#
|
|
57
|
-
# token block.
|
|
55
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
56
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
57
|
+
# not rounded to a token block.
|
|
58
58
|
prompt_cache_breakpoint: nil,
|
|
59
59
|
|
|
60
60
|
# The type of the input item. Always `input_text`.
|
|
@@ -94,9 +94,9 @@ module OpenAI
|
|
|
94
94
|
sig { params(ttl: OpenAI::Beta::BetaResponseInputText::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
95
95
|
attr_writer :ttl
|
|
96
96
|
|
|
97
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
98
|
-
#
|
|
99
|
-
# token block.
|
|
97
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
98
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
99
|
+
# not rounded to a token block.
|
|
100
100
|
sig do
|
|
101
101
|
params(
|
|
102
102
|
|
|
@@ -24,9 +24,9 @@ module OpenAI
|
|
|
24
24
|
sig { returns(Symbol) }
|
|
25
25
|
attr_accessor :type
|
|
26
26
|
|
|
27
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
28
|
-
#
|
|
29
|
-
# token block.
|
|
27
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
28
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
29
|
+
# not rounded to a token block.
|
|
30
30
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint)) }
|
|
31
31
|
attr_reader :prompt_cache_breakpoint
|
|
32
32
|
|
|
@@ -59,9 +59,9 @@ module OpenAI
|
|
|
59
59
|
# The text input to the model.
|
|
60
60
|
text:,
|
|
61
61
|
|
|
62
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
63
|
-
#
|
|
64
|
-
# token block.
|
|
62
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
63
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
64
|
+
# not rounded to a token block.
|
|
65
65
|
prompt_cache_breakpoint: nil,
|
|
66
66
|
|
|
67
67
|
# The type of the input item. Always `input_text`.
|
|
@@ -101,9 +101,9 @@ module OpenAI
|
|
|
101
101
|
sig { params(ttl: OpenAI::Beta::BetaResponseInputTextContent::PromptCacheBreakpoint::Ttl::OrSymbol).void }
|
|
102
102
|
attr_writer :ttl
|
|
103
103
|
|
|
104
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
105
|
-
#
|
|
106
|
-
# token block.
|
|
104
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
105
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
106
|
+
# not rounded to a token block.
|
|
107
107
|
sig do
|
|
108
108
|
params(
|
|
109
109
|
|
|
@@ -335,9 +335,9 @@ module OpenAI
|
|
|
335
335
|
sig { returns(Symbol) }
|
|
336
336
|
attr_accessor :type
|
|
337
337
|
|
|
338
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
339
|
-
#
|
|
340
|
-
# token block.
|
|
338
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
339
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
340
|
+
# not rounded to a token block.
|
|
341
341
|
sig {
|
|
342
342
|
returns(
|
|
343
343
|
T.nilable(
|
|
@@ -383,9 +383,9 @@ module OpenAI
|
|
|
383
383
|
# The URL of the screenshot image.
|
|
384
384
|
image_url:,
|
|
385
385
|
|
|
386
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
387
|
-
#
|
|
388
|
-
# token block.
|
|
386
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
387
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
388
|
+
# not rounded to a token block.
|
|
389
389
|
prompt_cache_breakpoint: nil,
|
|
390
390
|
|
|
391
391
|
# Specifies the event type. For a computer screenshot, this property is always set
|
|
@@ -477,9 +477,9 @@ module OpenAI
|
|
|
477
477
|
}
|
|
478
478
|
attr_writer :ttl
|
|
479
479
|
|
|
480
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
481
|
-
#
|
|
482
|
-
# token block.
|
|
480
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
481
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
482
|
+
# not rounded to a token block.
|
|
483
483
|
sig do
|
|
484
484
|
params(
|
|
485
485
|
|
|
@@ -335,9 +335,9 @@ module OpenAI
|
|
|
335
335
|
sig { returns(Symbol) }
|
|
336
336
|
attr_accessor :type
|
|
337
337
|
|
|
338
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
339
|
-
#
|
|
340
|
-
# token block.
|
|
338
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
339
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
340
|
+
# not rounded to a token block.
|
|
341
341
|
sig {
|
|
342
342
|
returns(
|
|
343
343
|
T.nilable(
|
|
@@ -383,9 +383,9 @@ module OpenAI
|
|
|
383
383
|
# The URL of the screenshot image.
|
|
384
384
|
image_url:,
|
|
385
385
|
|
|
386
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
387
|
-
#
|
|
388
|
-
# token block.
|
|
386
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
387
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
388
|
+
# not rounded to a token block.
|
|
389
389
|
prompt_cache_breakpoint: nil,
|
|
390
390
|
|
|
391
391
|
# Specifies the event type. For a computer screenshot, this property is always set
|
|
@@ -477,9 +477,9 @@ module OpenAI
|
|
|
477
477
|
}
|
|
478
478
|
attr_writer :ttl
|
|
479
479
|
|
|
480
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
481
|
-
#
|
|
482
|
-
# token block.
|
|
480
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
481
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
482
|
+
# not rounded to a token block.
|
|
483
483
|
sig do
|
|
484
484
|
params(
|
|
485
485
|
|
|
@@ -1308,8 +1308,8 @@ module OpenAI
|
|
|
1308
1308
|
|
|
1309
1309
|
# Control how much effort the model will exert to match the style and features,
|
|
1310
1310
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1311
|
-
# `gpt-image-1
|
|
1312
|
-
#
|
|
1311
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1312
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1313
1313
|
sig {
|
|
1314
1314
|
returns(
|
|
1315
1315
|
T.nilable(
|
|
@@ -1527,8 +1527,8 @@ module OpenAI
|
|
|
1527
1527
|
|
|
1528
1528
|
# Control how much effort the model will exert to match the style and features,
|
|
1529
1529
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1530
|
-
# `gpt-image-1
|
|
1531
|
-
#
|
|
1530
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1531
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1532
1532
|
input_fidelity: nil,
|
|
1533
1533
|
|
|
1534
1534
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -1688,8 +1688,8 @@ module OpenAI
|
|
|
1688
1688
|
|
|
1689
1689
|
# Control how much effort the model will exert to match the style and features,
|
|
1690
1690
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1691
|
-
# `gpt-image-1
|
|
1692
|
-
#
|
|
1691
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1692
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1693
1693
|
module InputFidelity
|
|
1694
1694
|
extend OpenAI::Internal::Type::Enum
|
|
1695
1695
|
|
|
@@ -58,6 +58,15 @@ module OpenAI
|
|
|
58
58
|
sig { returns(T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam))) }
|
|
59
59
|
attr_accessor :conversation
|
|
60
60
|
|
|
61
|
+
# Whether to generate output for this response. Defaults to true when omitted. Set
|
|
62
|
+
# to false to prepare request state without model output; the response ID can be
|
|
63
|
+
# used as previous_response_id on a later turn.
|
|
64
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
65
|
+
attr_reader :generate
|
|
66
|
+
|
|
67
|
+
sig { params(generate: T::Boolean).void }
|
|
68
|
+
attr_writer :generate
|
|
69
|
+
|
|
61
70
|
# Specify additional output data to include in the model response. Currently
|
|
62
71
|
# supported values are:
|
|
63
72
|
#
|
|
@@ -503,6 +512,8 @@ module OpenAI
|
|
|
503
512
|
|
|
504
513
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
|
|
505
514
|
|
|
515
|
+
generate: T::Boolean,
|
|
516
|
+
|
|
506
517
|
include: T.nilable(T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]),
|
|
507
518
|
|
|
508
519
|
input: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants,
|
|
@@ -616,6 +627,11 @@ module OpenAI
|
|
|
616
627
|
# response completes.
|
|
617
628
|
conversation: nil,
|
|
618
629
|
|
|
630
|
+
# Whether to generate output for this response. Defaults to true when omitted. Set
|
|
631
|
+
# to false to prepare request state without model output; the response ID can be
|
|
632
|
+
# used as previous_response_id on a later turn.
|
|
633
|
+
generate: nil,
|
|
634
|
+
|
|
619
635
|
# Specify additional output data to include in the model response. Currently
|
|
620
636
|
# supported values are:
|
|
621
637
|
#
|
|
@@ -882,6 +898,7 @@ module OpenAI
|
|
|
882
898
|
T::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]
|
|
883
899
|
),
|
|
884
900
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam)),
|
|
901
|
+
generate: T.nilable(T::Boolean),
|
|
885
902
|
include: T.nilable(T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]),
|
|
886
903
|
input: T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants),
|
|
887
904
|
instructions: T.nilable(String),
|
|
@@ -978,8 +978,8 @@ module OpenAI
|
|
|
978
978
|
|
|
979
979
|
# Control how much effort the model will exert to match the style and features,
|
|
980
980
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
981
|
-
# `gpt-image-1
|
|
982
|
-
#
|
|
981
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
982
|
+
# this parameter. Defaults to `low` on supported models.
|
|
983
983
|
sig { returns(T.nilable(OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::OrSymbol)) }
|
|
984
984
|
attr_accessor :input_fidelity
|
|
985
985
|
|
|
@@ -1109,8 +1109,8 @@ module OpenAI
|
|
|
1109
1109
|
|
|
1110
1110
|
# Control how much effort the model will exert to match the style and features,
|
|
1111
1111
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1112
|
-
# `gpt-image-1
|
|
1113
|
-
#
|
|
1112
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1113
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1114
1114
|
input_fidelity: nil,
|
|
1115
1115
|
|
|
1116
1116
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -1228,8 +1228,8 @@ module OpenAI
|
|
|
1228
1228
|
|
|
1229
1229
|
# Control how much effort the model will exert to match the style and features,
|
|
1230
1230
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
1231
|
-
# `gpt-image-1
|
|
1232
|
-
#
|
|
1231
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
1232
|
+
# this parameter. Defaults to `low` on supported models.
|
|
1233
1233
|
module InputFidelity
|
|
1234
1234
|
extend OpenAI::Internal::Type::Enum
|
|
1235
1235
|
|
|
@@ -38,9 +38,9 @@ module OpenAI
|
|
|
38
38
|
sig { returns(Symbol) }
|
|
39
39
|
attr_accessor :type
|
|
40
40
|
|
|
41
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
42
|
-
#
|
|
43
|
-
# token block.
|
|
41
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
42
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
43
|
+
# not rounded to a token block.
|
|
44
44
|
sig { returns(T.nilable(OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint)) }
|
|
45
45
|
attr_reader :prompt_cache_breakpoint
|
|
46
46
|
|
|
@@ -69,9 +69,9 @@ module OpenAI
|
|
|
69
69
|
|
|
70
70
|
file:,
|
|
71
71
|
|
|
72
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
73
|
-
#
|
|
74
|
-
# token block.
|
|
72
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
73
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
74
|
+
# not rounded to a token block.
|
|
75
75
|
prompt_cache_breakpoint: nil,
|
|
76
76
|
|
|
77
77
|
# The type of the content part. Always `file`.
|
|
@@ -181,9 +181,9 @@ module OpenAI
|
|
|
181
181
|
}
|
|
182
182
|
attr_writer :ttl
|
|
183
183
|
|
|
184
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
185
|
-
#
|
|
186
|
-
# token block.
|
|
184
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
185
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
186
|
+
# not rounded to a token block.
|
|
187
187
|
sig do
|
|
188
188
|
params(
|
|
189
189
|
|