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
|
@@ -192,14 +192,14 @@ module OpenAI
|
|
|
192
192
|
# to `computer_screenshot`.
|
|
193
193
|
attr_accessor type: :computer_screenshot
|
|
194
194
|
|
|
195
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
196
|
-
#
|
|
197
|
-
# token block.
|
|
195
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
196
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
197
|
+
# not rounded to a token block.
|
|
198
198
|
attr_reader prompt_cache_breakpoint: OpenAI::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint?
|
|
199
199
|
|
|
200
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
201
|
-
#
|
|
202
|
-
# token block.
|
|
200
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
201
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
202
|
+
# not rounded to a token block.
|
|
203
203
|
def prompt_cache_breakpoint=: (
|
|
204
204
|
OpenAI::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint
|
|
205
205
|
) -> OpenAI::Beta::BetaResponseItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint
|
|
@@ -212,9 +212,9 @@ module OpenAI
|
|
|
212
212
|
# @param image_url
|
|
213
213
|
# The URL of the screenshot image.
|
|
214
214
|
# @param prompt_cache_breakpoint
|
|
215
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
216
|
-
#
|
|
217
|
-
# token block.
|
|
215
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
216
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
217
|
+
# not rounded to a token block.
|
|
218
218
|
# @param type
|
|
219
219
|
# Specifies the event type. For a computer screenshot, this property is always set
|
|
220
220
|
# to `computer_screenshot`.
|
|
@@ -190,14 +190,14 @@ module OpenAI
|
|
|
190
190
|
# to `computer_screenshot`.
|
|
191
191
|
attr_accessor type: :computer_screenshot
|
|
192
192
|
|
|
193
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
194
|
-
#
|
|
195
|
-
# token block.
|
|
193
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
194
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
195
|
+
# not rounded to a token block.
|
|
196
196
|
attr_reader prompt_cache_breakpoint: OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint?
|
|
197
197
|
|
|
198
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
199
|
-
#
|
|
200
|
-
# token block.
|
|
198
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
199
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
200
|
+
# not rounded to a token block.
|
|
201
201
|
def prompt_cache_breakpoint=: (
|
|
202
202
|
OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint
|
|
203
203
|
) -> OpenAI::Beta::BetaResponseOutputItem::AgentMessage::Content::ComputerScreenshot::PromptCacheBreakpoint
|
|
@@ -210,9 +210,9 @@ module OpenAI
|
|
|
210
210
|
# @param image_url
|
|
211
211
|
# The URL of the screenshot image.
|
|
212
212
|
# @param prompt_cache_breakpoint
|
|
213
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
214
|
-
#
|
|
215
|
-
# token block.
|
|
213
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
214
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
215
|
+
# not rounded to a token block.
|
|
216
216
|
# @param type
|
|
217
217
|
# Specifies the event type. For a computer screenshot, this property is always set
|
|
218
218
|
# to `computer_screenshot`.
|
|
@@ -720,8 +720,8 @@ module OpenAI
|
|
|
720
720
|
|
|
721
721
|
# Control how much effort the model will exert to match the style and features,
|
|
722
722
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
723
|
-
# `gpt-image-1
|
|
724
|
-
#
|
|
723
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
724
|
+
# this parameter. Defaults to `low` on supported models.
|
|
725
725
|
attr_accessor input_fidelity: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::input_fidelity?
|
|
726
726
|
|
|
727
727
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -843,8 +843,8 @@ module OpenAI
|
|
|
843
843
|
# @param input_fidelity
|
|
844
844
|
# Control how much effort the model will exert to match the style and features,
|
|
845
845
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
846
|
-
# `gpt-image-1
|
|
847
|
-
#
|
|
846
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
847
|
+
# this parameter. Defaults to `low` on supported models.
|
|
848
848
|
# @param input_image_mask
|
|
849
849
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
850
850
|
# `file_id` (string, optional).
|
|
@@ -18,6 +18,7 @@ module OpenAI
|
|
|
18
18
|
?background: bool?,
|
|
19
19
|
?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?,
|
|
20
20
|
?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?,
|
|
21
|
+
?generate: bool,
|
|
21
22
|
?include: ::Array[OpenAI::Models::Beta::beta_response_includable]?,
|
|
22
23
|
?input: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::input,
|
|
23
24
|
?instructions: String?,
|
|
@@ -75,6 +76,16 @@ module OpenAI
|
|
|
75
76
|
# response completes.
|
|
76
77
|
attr_accessor conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?
|
|
77
78
|
|
|
79
|
+
# Whether to generate output for this response. Defaults to true when omitted. Set
|
|
80
|
+
# to false to prepare request state without model output; the response ID can be
|
|
81
|
+
# used as previous_response_id on a later turn.
|
|
82
|
+
attr_reader generate: bool?
|
|
83
|
+
|
|
84
|
+
# Whether to generate output for this response. Defaults to true when omitted. Set
|
|
85
|
+
# to false to prepare request state without model output; the response ID can be
|
|
86
|
+
# used as previous_response_id on a later turn.
|
|
87
|
+
def generate=: (bool) -> bool
|
|
88
|
+
|
|
78
89
|
# Specify additional output data to include in the model response. Currently
|
|
79
90
|
# supported values are:
|
|
80
91
|
#
|
|
@@ -426,6 +437,10 @@ module OpenAI
|
|
|
426
437
|
# prepended to `input_items` for this response request. Input items and output
|
|
427
438
|
# items from this response are automatically added to this conversation after this
|
|
428
439
|
# response completes.
|
|
440
|
+
# @param generate
|
|
441
|
+
# Whether to generate output for this response. Defaults to true when omitted. Set
|
|
442
|
+
# to false to prepare request state without model output; the response ID can be
|
|
443
|
+
# used as previous_response_id on a later turn.
|
|
429
444
|
# @param include
|
|
430
445
|
# Specify additional output data to include in the model response. Currently
|
|
431
446
|
# supported values are:
|
|
@@ -653,6 +668,7 @@ module OpenAI
|
|
|
653
668
|
?background: bool?,
|
|
654
669
|
?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?,
|
|
655
670
|
?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?,
|
|
671
|
+
?generate: bool,
|
|
656
672
|
?include: ::Array[OpenAI::Models::Beta::beta_response_includable]?,
|
|
657
673
|
?input: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::input,
|
|
658
674
|
?instructions: String?,
|
|
@@ -692,6 +708,7 @@ module OpenAI
|
|
|
692
708
|
?background: bool?,
|
|
693
709
|
?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?,
|
|
694
710
|
?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?,
|
|
711
|
+
?generate: bool,
|
|
695
712
|
?include: ::Array[OpenAI::Models::Beta::beta_response_includable]?,
|
|
696
713
|
?input: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::input,
|
|
697
714
|
?instructions: String?,
|
|
@@ -645,8 +645,8 @@ module OpenAI
|
|
|
645
645
|
|
|
646
646
|
# Control how much effort the model will exert to match the style and features,
|
|
647
647
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
648
|
-
# `gpt-image-1
|
|
649
|
-
#
|
|
648
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
649
|
+
# this parameter. Defaults to `low` on supported models.
|
|
650
650
|
attr_accessor input_fidelity: OpenAI::Models::Beta::BetaTool::ImageGeneration::input_fidelity?
|
|
651
651
|
|
|
652
652
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -768,8 +768,8 @@ module OpenAI
|
|
|
768
768
|
# @param input_fidelity
|
|
769
769
|
# Control how much effort the model will exert to match the style and features,
|
|
770
770
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
771
|
-
# `gpt-image-1
|
|
772
|
-
#
|
|
771
|
+
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
772
|
+
# this parameter. Defaults to `low` on supported models.
|
|
773
773
|
# @param input_image_mask
|
|
774
774
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
775
775
|
# `file_id` (string, optional).
|
|
@@ -298,7 +298,9 @@ module OpenAI
|
|
|
298
298
|
# can call.
|
|
299
299
|
def tool_choice=: (
|
|
300
300
|
OpenAI::Models::Beta::ResponseCreateParams::tool_choice
|
|
301
|
-
|
|
301
|
+
| { type: :programmatic_tool_calling }
|
|
302
|
+
) -> (OpenAI::Models::Beta::ResponseCreateParams::tool_choice
|
|
303
|
+
| { type: :programmatic_tool_calling })
|
|
302
304
|
|
|
303
305
|
# An array of tools the model may call while generating a response. You can
|
|
304
306
|
# specify which tool to use by setting the `tool_choice` parameter.
|
|
@@ -633,7 +635,8 @@ module OpenAI
|
|
|
633
635
|
?stream_options: OpenAI::Beta::ResponseCreateParams::StreamOptions?,
|
|
634
636
|
?temperature: Float?,
|
|
635
637
|
?text: OpenAI::Beta::BetaResponseTextConfig,
|
|
636
|
-
?tool_choice: OpenAI::Models::Beta::ResponseCreateParams::tool_choice
|
|
638
|
+
?tool_choice: OpenAI::Models::Beta::ResponseCreateParams::tool_choice
|
|
639
|
+
| { type: :programmatic_tool_calling },
|
|
637
640
|
?tools: ::Array[OpenAI::Models::Beta::beta_tool],
|
|
638
641
|
?top_logprobs: Integer?,
|
|
639
642
|
?top_p: Float?,
|
|
@@ -79,7 +79,14 @@ module OpenAI
|
|
|
79
79
|
attr_accessor text: OpenAI::Beta::Responses::InputTokenCountParams::Text?
|
|
80
80
|
|
|
81
81
|
# Controls which tool the model should use, if any.
|
|
82
|
-
|
|
82
|
+
attr_reader tool_choice: OpenAI::Models::Beta::Responses::InputTokenCountParams::tool_choice?
|
|
83
|
+
|
|
84
|
+
# Controls which tool the model should use, if any.
|
|
85
|
+
def tool_choice=: (
|
|
86
|
+
(OpenAI::Models::Beta::Responses::InputTokenCountParams::tool_choice
|
|
87
|
+
| { type: :programmatic_tool_calling })?
|
|
88
|
+
) -> (OpenAI::Models::Beta::Responses::InputTokenCountParams::tool_choice
|
|
89
|
+
| { type: :programmatic_tool_calling })?
|
|
83
90
|
|
|
84
91
|
# An array of tools the model may call while generating a response. You can
|
|
85
92
|
# specify which tool to use by setting the `tool_choice` parameter.
|
|
@@ -166,7 +173,8 @@ module OpenAI
|
|
|
166
173
|
?previous_response_id: String?,
|
|
167
174
|
?reasoning: OpenAI::Beta::Responses::InputTokenCountParams::Reasoning?,
|
|
168
175
|
?text: OpenAI::Beta::Responses::InputTokenCountParams::Text?,
|
|
169
|
-
?tool_choice: OpenAI::Models::Beta::Responses::InputTokenCountParams::tool_choice
|
|
176
|
+
?tool_choice: (OpenAI::Models::Beta::Responses::InputTokenCountParams::tool_choice
|
|
177
|
+
| { type: :programmatic_tool_calling })?,
|
|
170
178
|
?tools: ::Array[OpenAI::Models::Beta::beta_tool]?,
|
|
171
179
|
?truncation: OpenAI::Models::Beta::Responses::InputTokenCountParams::truncation,
|
|
172
180
|
?betas: ::Array[OpenAI::Models::Beta::Responses::InputTokenCountParams::beta],
|
|
@@ -441,8 +441,10 @@ module OpenAI
|
|
|
441
441
|
|
|
442
442
|
# The tools to add this file to.
|
|
443
443
|
def tools=: (
|
|
444
|
-
::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
|
|
445
|
-
|
|
444
|
+
::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
|
|
445
|
+
| { type: :file_search }]
|
|
446
|
+
) -> ::Array[(OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
|
|
447
|
+
| { type: :file_search })]
|
|
446
448
|
|
|
447
449
|
# @param file_id
|
|
448
450
|
# The ID of the file to attach to the message.
|
|
@@ -450,7 +452,8 @@ module OpenAI
|
|
|
450
452
|
# The tools to add this file to.
|
|
451
453
|
def initialize: (
|
|
452
454
|
?file_id: String,
|
|
453
|
-
?tools: ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
|
|
455
|
+
?tools: ::Array[OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::tool
|
|
456
|
+
| { type: :file_search }]
|
|
454
457
|
) -> void
|
|
455
458
|
|
|
456
459
|
def to_hash: -> {
|
|
@@ -603,7 +606,9 @@ module OpenAI
|
|
|
603
606
|
# strategy.
|
|
604
607
|
def chunking_strategy=: (
|
|
605
608
|
OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
606
|
-
|
|
609
|
+
| { type: :auto }
|
|
610
|
+
) -> (OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
611
|
+
| { type: :auto })
|
|
607
612
|
|
|
608
613
|
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
609
614
|
# IDs to add to the vector store. For vector stores created before Nov 2025, there
|
|
@@ -641,7 +646,8 @@ module OpenAI
|
|
|
641
646
|
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
642
647
|
# a maximum length of 512 characters.
|
|
643
648
|
def initialize: (
|
|
644
|
-
?chunking_strategy: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
649
|
+
?chunking_strategy: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
650
|
+
| { type: :auto },
|
|
645
651
|
?file_ids: ::Array[String],
|
|
646
652
|
?metadata: OpenAI::Models::metadata?
|
|
647
653
|
) -> void
|
|
@@ -173,8 +173,10 @@ module OpenAI
|
|
|
173
173
|
|
|
174
174
|
# The tools to add this file to.
|
|
175
175
|
def tools=: (
|
|
176
|
-
::Array[OpenAI::Models::Beta::ThreadCreateParams::Message::Attachment::tool
|
|
177
|
-
|
|
176
|
+
::Array[OpenAI::Models::Beta::ThreadCreateParams::Message::Attachment::tool
|
|
177
|
+
| { type: :file_search }]
|
|
178
|
+
) -> ::Array[(OpenAI::Models::Beta::ThreadCreateParams::Message::Attachment::tool
|
|
179
|
+
| { type: :file_search })]
|
|
178
180
|
|
|
179
181
|
# @param file_id
|
|
180
182
|
# The ID of the file to attach to the message.
|
|
@@ -182,7 +184,8 @@ module OpenAI
|
|
|
182
184
|
# The tools to add this file to.
|
|
183
185
|
def initialize: (
|
|
184
186
|
?file_id: String,
|
|
185
|
-
?tools: ::Array[OpenAI::Models::Beta::ThreadCreateParams::Message::Attachment::tool
|
|
187
|
+
?tools: ::Array[OpenAI::Models::Beta::ThreadCreateParams::Message::Attachment::tool
|
|
188
|
+
| { type: :file_search }]
|
|
186
189
|
) -> void
|
|
187
190
|
|
|
188
191
|
def to_hash: -> {
|
|
@@ -335,7 +338,9 @@ module OpenAI
|
|
|
335
338
|
# strategy.
|
|
336
339
|
def chunking_strategy=: (
|
|
337
340
|
OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
338
|
-
|
|
341
|
+
| { type: :auto }
|
|
342
|
+
) -> (OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
343
|
+
| { type: :auto })
|
|
339
344
|
|
|
340
345
|
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
341
346
|
# IDs to add to the vector store. For vector stores created before Nov 2025, there
|
|
@@ -373,7 +378,8 @@ module OpenAI
|
|
|
373
378
|
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
374
379
|
# a maximum length of 512 characters.
|
|
375
380
|
def initialize: (
|
|
376
|
-
?chunking_strategy: OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
381
|
+
?chunking_strategy: OpenAI::Models::Beta::ThreadCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
382
|
+
| { type: :auto },
|
|
377
383
|
?file_ids: ::Array[String],
|
|
378
384
|
?metadata: OpenAI::Models::metadata?
|
|
379
385
|
) -> void
|
|
@@ -117,8 +117,10 @@ module OpenAI
|
|
|
117
117
|
|
|
118
118
|
# The tools to add this file to.
|
|
119
119
|
def tools=: (
|
|
120
|
-
::Array[OpenAI::Models::Beta::Threads::MessageCreateParams::Attachment::tool
|
|
121
|
-
|
|
120
|
+
::Array[OpenAI::Models::Beta::Threads::MessageCreateParams::Attachment::tool
|
|
121
|
+
| { type: :file_search }]
|
|
122
|
+
) -> ::Array[(OpenAI::Models::Beta::Threads::MessageCreateParams::Attachment::tool
|
|
123
|
+
| { type: :file_search })]
|
|
122
124
|
|
|
123
125
|
# @param file_id
|
|
124
126
|
# The ID of the file to attach to the message.
|
|
@@ -126,7 +128,8 @@ module OpenAI
|
|
|
126
128
|
# The tools to add this file to.
|
|
127
129
|
def initialize: (
|
|
128
130
|
?file_id: String,
|
|
129
|
-
?tools: ::Array[OpenAI::Models::Beta::Threads::MessageCreateParams::Attachment::tool
|
|
131
|
+
?tools: ::Array[OpenAI::Models::Beta::Threads::MessageCreateParams::Attachment::tool
|
|
132
|
+
| { type: :file_search }]
|
|
130
133
|
) -> void
|
|
131
134
|
|
|
132
135
|
def to_hash: -> {
|
|
@@ -418,8 +418,10 @@ module OpenAI
|
|
|
418
418
|
|
|
419
419
|
# The tools to add this file to.
|
|
420
420
|
def tools=: (
|
|
421
|
-
::Array[OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::tool
|
|
422
|
-
|
|
421
|
+
::Array[OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::tool
|
|
422
|
+
| { type: :file_search }]
|
|
423
|
+
) -> ::Array[(OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::tool
|
|
424
|
+
| { type: :file_search })]
|
|
423
425
|
|
|
424
426
|
# @param file_id
|
|
425
427
|
# The ID of the file to attach to the message.
|
|
@@ -427,7 +429,8 @@ module OpenAI
|
|
|
427
429
|
# The tools to add this file to.
|
|
428
430
|
def initialize: (
|
|
429
431
|
?file_id: String,
|
|
430
|
-
?tools: ::Array[OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::tool
|
|
432
|
+
?tools: ::Array[OpenAI::Models::Beta::Threads::RunCreateParams::AdditionalMessage::Attachment::tool
|
|
433
|
+
| { type: :file_search }]
|
|
431
434
|
) -> void
|
|
432
435
|
|
|
433
436
|
def to_hash: -> {
|
|
@@ -25,22 +25,22 @@ module OpenAI
|
|
|
25
25
|
# The type of the content part. Always `file`.
|
|
26
26
|
attr_accessor type: :file
|
|
27
27
|
|
|
28
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
29
|
-
#
|
|
30
|
-
# token block.
|
|
28
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
29
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
30
|
+
# not rounded to a token block.
|
|
31
31
|
attr_reader prompt_cache_breakpoint: OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint?
|
|
32
32
|
|
|
33
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
34
|
-
#
|
|
35
|
-
# token block.
|
|
33
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
34
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
35
|
+
# not rounded to a token block.
|
|
36
36
|
def prompt_cache_breakpoint=: (
|
|
37
37
|
OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint
|
|
38
38
|
) -> OpenAI::Chat::ChatCompletionContentPart::File::PromptCacheBreakpoint
|
|
39
39
|
|
|
40
40
|
# @param prompt_cache_breakpoint
|
|
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
|
# @param type
|
|
45
45
|
# The type of the content part. Always `file`.
|
|
46
46
|
def initialize: (
|
|
@@ -16,22 +16,22 @@ module OpenAI
|
|
|
16
16
|
# The type of the content part.
|
|
17
17
|
attr_accessor type: :image_url
|
|
18
18
|
|
|
19
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
20
|
-
#
|
|
21
|
-
# token block.
|
|
19
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
20
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
21
|
+
# not rounded to a token block.
|
|
22
22
|
attr_reader prompt_cache_breakpoint: OpenAI::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint?
|
|
23
23
|
|
|
24
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
25
|
-
#
|
|
26
|
-
# token block.
|
|
24
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
25
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
26
|
+
# not rounded to a token block.
|
|
27
27
|
def prompt_cache_breakpoint=: (
|
|
28
28
|
OpenAI::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint
|
|
29
29
|
) -> OpenAI::Chat::ChatCompletionContentPartImage::PromptCacheBreakpoint
|
|
30
30
|
|
|
31
31
|
# @param prompt_cache_breakpoint
|
|
32
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
33
|
-
#
|
|
34
|
-
# token block.
|
|
32
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
33
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
34
|
+
# not rounded to a token block.
|
|
35
35
|
# @param type
|
|
36
36
|
# The type of the content part.
|
|
37
37
|
def initialize: (
|
|
@@ -16,22 +16,22 @@ module OpenAI
|
|
|
16
16
|
# The type of the content part. Always `input_audio`.
|
|
17
17
|
attr_accessor type: :input_audio
|
|
18
18
|
|
|
19
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
20
|
-
#
|
|
21
|
-
# token block.
|
|
19
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
20
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
21
|
+
# not rounded to a token block.
|
|
22
22
|
attr_reader prompt_cache_breakpoint: OpenAI::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint?
|
|
23
23
|
|
|
24
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
25
|
-
#
|
|
26
|
-
# token block.
|
|
24
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
25
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
26
|
+
# not rounded to a token block.
|
|
27
27
|
def prompt_cache_breakpoint=: (
|
|
28
28
|
OpenAI::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint
|
|
29
29
|
) -> OpenAI::Chat::ChatCompletionContentPartInputAudio::PromptCacheBreakpoint
|
|
30
30
|
|
|
31
31
|
# @param prompt_cache_breakpoint
|
|
32
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
33
|
-
#
|
|
34
|
-
# token block.
|
|
32
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
33
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
34
|
+
# not rounded to a token block.
|
|
35
35
|
# @param type
|
|
36
36
|
# The type of the content part. Always `input_audio`.
|
|
37
37
|
def initialize: (
|
|
@@ -17,14 +17,14 @@ module OpenAI
|
|
|
17
17
|
# The type of the content part.
|
|
18
18
|
attr_accessor type: :text
|
|
19
19
|
|
|
20
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
21
|
-
#
|
|
22
|
-
# token block.
|
|
20
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
21
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
22
|
+
# not rounded to a token block.
|
|
23
23
|
attr_reader prompt_cache_breakpoint: OpenAI::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint?
|
|
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
|
def prompt_cache_breakpoint=: (
|
|
29
29
|
OpenAI::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint
|
|
30
30
|
) -> OpenAI::Chat::ChatCompletionContentPartText::PromptCacheBreakpoint
|
|
@@ -32,9 +32,9 @@ module OpenAI
|
|
|
32
32
|
# @param text
|
|
33
33
|
# The text content.
|
|
34
34
|
# @param prompt_cache_breakpoint
|
|
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
|
# @param type
|
|
39
39
|
# The type of the content part.
|
|
40
40
|
def initialize: (
|
|
@@ -25,14 +25,14 @@ module OpenAI
|
|
|
25
25
|
# to `computer_screenshot`.
|
|
26
26
|
attr_accessor type: :computer_screenshot
|
|
27
27
|
|
|
28
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
29
|
-
#
|
|
30
|
-
# token block.
|
|
28
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
29
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
30
|
+
# not rounded to a token block.
|
|
31
31
|
attr_reader prompt_cache_breakpoint: OpenAI::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint?
|
|
32
32
|
|
|
33
|
-
# Marks the exact end of a reusable prompt prefix.
|
|
34
|
-
#
|
|
35
|
-
# token block.
|
|
33
|
+
# Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the
|
|
34
|
+
# breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is
|
|
35
|
+
# not rounded to a token block.
|
|
36
36
|
def prompt_cache_breakpoint=: (
|
|
37
37
|
OpenAI::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint
|
|
38
38
|
) -> OpenAI::Conversations::ComputerScreenshotContent::PromptCacheBreakpoint
|
|
@@ -45,9 +45,9 @@ module OpenAI
|
|
|
45
45
|
# @param image_url
|
|
46
46
|
# The URL of the screenshot image.
|
|
47
47
|
# @param prompt_cache_breakpoint
|
|
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
|
# @param type
|
|
52
52
|
# Specifies the event type. For a computer screenshot, this property is always set
|
|
53
53
|
# to `computer_screenshot`.
|
|
@@ -26,7 +26,25 @@ module OpenAI
|
|
|
26
26
|
|
|
27
27
|
# Ask 1–400 questions about the input. Each question can be a predicate, choice,
|
|
28
28
|
# or score. Answers come back in the same order.
|
|
29
|
-
|
|
29
|
+
attr_reader questions: ::Array[OpenAI::Models::DecisionCreateParams::question]
|
|
30
|
+
|
|
31
|
+
# Ask 1–400 questions about the input. Each question can be a predicate, choice,
|
|
32
|
+
# or score. Answers come back in the same order.
|
|
33
|
+
def questions=: (
|
|
34
|
+
::Array[OpenAI::Models::DecisionCreateParams::question
|
|
35
|
+
| {
|
|
36
|
+
instructions: String
|
|
37
|
+
| ::Array[OpenAI::Models::decision_question_input_part],
|
|
38
|
+
type: :predicate,
|
|
39
|
+
?name: String
|
|
40
|
+
}]
|
|
41
|
+
) -> ::Array[(OpenAI::Models::DecisionCreateParams::question
|
|
42
|
+
| {
|
|
43
|
+
instructions: (String
|
|
44
|
+
| ::Array[OpenAI::Models::decision_question_input_part]),
|
|
45
|
+
type: :predicate,
|
|
46
|
+
?name: String
|
|
47
|
+
})]
|
|
30
48
|
|
|
31
49
|
# Partition prompt cache reuse by caller-provided key.
|
|
32
50
|
attr_accessor prompt_cache_key: String?
|
|
@@ -74,7 +92,13 @@ module OpenAI
|
|
|
74
92
|
def initialize: (
|
|
75
93
|
input: OpenAI::Models::DecisionCreateParams::input,
|
|
76
94
|
model: String,
|
|
77
|
-
questions: ::Array[OpenAI::Models::DecisionCreateParams::question
|
|
95
|
+
questions: ::Array[OpenAI::Models::DecisionCreateParams::question
|
|
96
|
+
| {
|
|
97
|
+
instructions: String
|
|
98
|
+
| ::Array[OpenAI::Models::decision_question_input_part],
|
|
99
|
+
type: :predicate,
|
|
100
|
+
?name: String
|
|
101
|
+
}],
|
|
78
102
|
?prompt_cache_key: String?,
|
|
79
103
|
?prompt_cache_options: (OpenAI::DecisionCreateParams::PromptCacheOptions
|
|
80
104
|
| OpenAI::Models::DecisionCreateParams::prompt_cache_options)?,
|
|
@@ -102,6 +126,7 @@ module OpenAI
|
|
|
102
126
|
|
|
103
127
|
type union_member1 =
|
|
104
128
|
OpenAI::Models::decision_input_message
|
|
129
|
+
| OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage
|
|
105
130
|
| OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage
|
|
106
131
|
| OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage
|
|
107
132
|
| OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage
|
|
@@ -195,7 +195,15 @@ module OpenAI
|
|
|
195
195
|
class LabelModel < OpenAI::Internal::Type::BaseModel
|
|
196
196
|
# A list of chat messages forming the prompt or context. May include variable
|
|
197
197
|
# references to the `item` namespace, ie {{item.name}}.
|
|
198
|
-
|
|
198
|
+
attr_reader input: ::Array[OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::input]
|
|
199
|
+
|
|
200
|
+
# A list of chat messages forming the prompt or context. May include variable
|
|
201
|
+
# references to the `item` namespace, ie {{item.name}}.
|
|
202
|
+
def input=: (
|
|
203
|
+
::Array[OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::input
|
|
204
|
+
| { content: String, role: String }]
|
|
205
|
+
) -> ::Array[(OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::input
|
|
206
|
+
| { content: String, role: String })]
|
|
199
207
|
|
|
200
208
|
# The labels to classify to each item in the evaluation.
|
|
201
209
|
attr_accessor labels: ::Array[String]
|
|
@@ -226,7 +234,8 @@ module OpenAI
|
|
|
226
234
|
# @param type
|
|
227
235
|
# The object type, which is always `label_model`.
|
|
228
236
|
def initialize: (
|
|
229
|
-
input: ::Array[OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::input
|
|
237
|
+
input: ::Array[OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::input
|
|
238
|
+
| { content: String, role: String }],
|
|
230
239
|
labels: ::Array[String],
|
|
231
240
|
model: String,
|
|
232
241
|
name: String,
|
|
@@ -278,7 +287,17 @@ module OpenAI
|
|
|
278
287
|
class EvalItem < OpenAI::Internal::Type::BaseModel
|
|
279
288
|
# Inputs to the model - can contain template strings. Supports text, output text,
|
|
280
289
|
# input images, and input audio, either as a single item or an array of items.
|
|
281
|
-
|
|
290
|
+
attr_reader content: OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::content
|
|
291
|
+
|
|
292
|
+
# Inputs to the model - can contain template strings. Supports text, output text,
|
|
293
|
+
# input images, and input audio, either as a single item or an array of items.
|
|
294
|
+
def content=: (
|
|
295
|
+
OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::content
|
|
296
|
+
| { text: String, type: :output_text }
|
|
297
|
+
| { image_url: String, type: :input_image, ?detail: String }
|
|
298
|
+
) -> (OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::content
|
|
299
|
+
| { text: String, type: :output_text }
|
|
300
|
+
| { image_url: String, type: :input_image, ?detail: String })
|
|
282
301
|
|
|
283
302
|
# The role of the message input. One of `user`, `assistant`, `system`, or
|
|
284
303
|
# `developer`.
|
|
@@ -301,7 +320,9 @@ module OpenAI
|
|
|
301
320
|
# @param type
|
|
302
321
|
# The type of the message input. Always `message`.
|
|
303
322
|
def initialize: (
|
|
304
|
-
content: OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::content
|
|
323
|
+
content: OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::content
|
|
324
|
+
| { text: String, type: :output_text }
|
|
325
|
+
| { image_url: String, type: :input_image, ?detail: String },
|
|
305
326
|
role: OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::role,
|
|
306
327
|
?type: OpenAI::Models::EvalCreateParams::TestingCriterion::LabelModel::Input::EvalItem::type_
|
|
307
328
|
) -> void
|