openai 0.68.0 → 0.69.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 +23 -0
- data/README.md +7 -7
- data/lib/openai/internal/type/enum.rb +6 -6
- data/lib/openai/internal/util.rb +14 -2
- data/lib/openai/models/beta/assistant_create_params.rb +7 -14
- data/lib/openai/models/beta/assistant_update_params.rb +7 -14
- data/lib/openai/models/beta/beta_apply_patch_tool.rb +44 -0
- data/lib/openai/models/beta/beta_compacted_response.rb +58 -0
- data/lib/openai/models/beta/beta_computer_action.rb +398 -0
- data/lib/openai/models/beta/beta_computer_action_list.rb +13 -0
- data/lib/openai/models/beta/beta_computer_tool.rb +23 -0
- data/lib/openai/models/beta/beta_computer_use_preview_tool.rb +63 -0
- data/lib/openai/models/beta/beta_container_auto.rb +96 -0
- data/lib/openai/models/beta/beta_container_network_policy_allowlist.rb +37 -0
- data/lib/openai/models/beta/beta_container_network_policy_disabled.rb +20 -0
- data/lib/openai/models/beta/beta_container_network_policy_domain_secret.rb +36 -0
- data/lib/openai/models/beta/beta_container_reference.rb +28 -0
- data/lib/openai/models/beta/beta_custom_tool.rb +148 -0
- data/lib/openai/models/beta/beta_easy_input_message.rb +120 -0
- data/lib/openai/models/beta/beta_file_search_tool.rb +424 -0
- data/lib/openai/models/beta/beta_function_shell_tool.rb +67 -0
- data/lib/openai/models/beta/beta_function_tool.rb +97 -0
- data/lib/openai/models/beta/beta_inline_skill.rb +44 -0
- data/lib/openai/models/beta/beta_inline_skill_source.rb +38 -0
- data/lib/openai/models/beta/beta_local_environment.rb +28 -0
- data/lib/openai/models/beta/beta_local_skill.rb +36 -0
- data/lib/openai/models/beta/beta_namespace_tool.rb +146 -0
- data/lib/openai/models/beta/beta_response.rb +1425 -0
- data/lib/openai/models/beta/beta_response_apply_patch_tool_call.rb +258 -0
- data/lib/openai/models/beta/beta_response_apply_patch_tool_call_output.rb +156 -0
- data/lib/openai/models/beta/beta_response_audio_delta_event.rb +63 -0
- data/lib/openai/models/beta/beta_response_audio_done_event.rb +55 -0
- data/lib/openai/models/beta/beta_response_audio_transcript_delta_event.rb +63 -0
- data/lib/openai/models/beta/beta_response_audio_transcript_done_event.rb +55 -0
- data/lib/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rb +81 -0
- data/lib/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rb +76 -0
- data/lib/openai/models/beta/beta_response_code_interpreter_call_completed_event.rb +73 -0
- data/lib/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rb +77 -0
- data/lib/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rb +77 -0
- data/lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb +168 -0
- data/lib/openai/models/beta/beta_response_compaction_item.rb +69 -0
- data/lib/openai/models/beta/beta_response_compaction_item_param.rb +61 -0
- data/lib/openai/models/beta/beta_response_completed_event.rb +63 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call.rb +156 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +141 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rb +43 -0
- data/lib/openai/models/beta/beta_response_container_reference.rb +29 -0
- data/lib/openai/models/beta/beta_response_content.rb +56 -0
- data/lib/openai/models/beta/beta_response_content_part_added_event.rb +129 -0
- data/lib/openai/models/beta/beta_response_content_part_done_event.rb +129 -0
- data/lib/openai/models/beta/beta_response_conversation_param.rb +22 -0
- data/lib/openai/models/beta/beta_response_created_event.rb +63 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call.rb +142 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rb +76 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call_input_done_event.rb +76 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call_item.rb +55 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call_output.rb +171 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call_output_item.rb +55 -0
- data/lib/openai/models/beta/beta_response_error.rb +63 -0
- data/lib/openai/models/beta/beta_response_error_event.rb +79 -0
- data/lib/openai/models/beta/beta_response_failed_event.rb +63 -0
- data/lib/openai/models/beta/beta_response_file_search_call_completed_event.rb +72 -0
- data/lib/openai/models/beta/beta_response_file_search_call_in_progress_event.rb +72 -0
- data/lib/openai/models/beta/beta_response_file_search_call_searching_event.rb +72 -0
- data/lib/openai/models/beta/beta_response_file_search_tool_call.rb +168 -0
- data/lib/openai/models/beta/beta_response_format_text_config.rb +72 -0
- data/lib/openai/models/beta/beta_response_format_text_json_schema_config.rb +66 -0
- data/lib/openai/models/beta/beta_response_function_call_arguments_delta_event.rb +80 -0
- data/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb +83 -0
- data/lib/openai/models/beta/beta_response_function_call_output_item.rb +28 -0
- data/lib/openai/models/beta/beta_response_function_call_output_item_list.rb +14 -0
- data/lib/openai/models/beta/beta_response_function_shell_call_output_content.rb +90 -0
- data/lib/openai/models/beta/beta_response_function_shell_tool_call.rb +216 -0
- data/lib/openai/models/beta/beta_response_function_shell_tool_call_output.rb +265 -0
- data/lib/openai/models/beta/beta_response_function_tool_call.rb +168 -0
- data/lib/openai/models/beta/beta_response_function_tool_call_item.rb +57 -0
- data/lib/openai/models/beta/beta_response_function_tool_call_output_item.rb +201 -0
- data/lib/openai/models/beta/beta_response_function_web_search.rb +238 -0
- data/lib/openai/models/beta/beta_response_image_gen_call_completed_event.rb +69 -0
- data/lib/openai/models/beta/beta_response_image_gen_call_generating_event.rb +69 -0
- data/lib/openai/models/beta/beta_response_image_gen_call_in_progress_event.rb +68 -0
- data/lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb +89 -0
- data/lib/openai/models/beta/beta_response_in_progress_event.rb +63 -0
- data/lib/openai/models/beta/beta_response_includable.rb +45 -0
- data/lib/openai/models/beta/beta_response_incomplete_event.rb +63 -0
- data/lib/openai/models/beta/beta_response_inject_created_event.rb +51 -0
- data/lib/openai/models/beta/beta_response_inject_event.rb +40 -0
- data/lib/openai/models/beta/beta_response_inject_failed_event.rb +103 -0
- data/lib/openai/models/beta/beta_response_input.rb +13 -0
- data/lib/openai/models/beta/beta_response_input_audio.rb +70 -0
- data/lib/openai/models/beta/beta_response_input_content.rb +28 -0
- data/lib/openai/models/beta/beta_response_input_file.rb +113 -0
- data/lib/openai/models/beta/beta_response_input_file_content.rb +115 -0
- data/lib/openai/models/beta/beta_response_input_image.rb +94 -0
- data/lib/openai/models/beta/beta_response_input_image_content.rb +96 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +2819 -0
- data/lib/openai/models/beta/beta_response_input_message_content_list.rb +14 -0
- data/lib/openai/models/beta/beta_response_input_message_item.rb +108 -0
- data/lib/openai/models/beta/beta_response_input_text.rb +59 -0
- data/lib/openai/models/beta/beta_response_input_text_content.rb +61 -0
- data/lib/openai/models/beta/beta_response_item.rb +1438 -0
- data/lib/openai/models/beta/beta_response_local_environment.rb +22 -0
- data/lib/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rb +81 -0
- data/lib/openai/models/beta/beta_response_mcp_call_arguments_done_event.rb +79 -0
- data/lib/openai/models/beta/beta_response_mcp_call_completed_event.rb +68 -0
- data/lib/openai/models/beta/beta_response_mcp_call_failed_event.rb +68 -0
- data/lib/openai/models/beta/beta_response_mcp_call_in_progress_event.rb +68 -0
- data/lib/openai/models/beta/beta_response_mcp_list_tools_completed_event.rb +68 -0
- data/lib/openai/models/beta/beta_response_mcp_list_tools_failed_event.rb +68 -0
- data/lib/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rb +69 -0
- data/lib/openai/models/beta/beta_response_output_audio.rb +41 -0
- data/lib/openai/models/beta/beta_response_output_item.rb +1444 -0
- data/lib/openai/models/beta/beta_response_output_item_added_event.rb +71 -0
- data/lib/openai/models/beta/beta_response_output_item_done_event.rb +71 -0
- data/lib/openai/models/beta/beta_response_output_message.rb +139 -0
- data/lib/openai/models/beta/beta_response_output_refusal.rb +30 -0
- data/lib/openai/models/beta/beta_response_output_text.rb +292 -0
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +92 -0
- data/lib/openai/models/beta/beta_response_prompt.rb +65 -0
- data/lib/openai/models/beta/beta_response_queued_event.rb +60 -0
- data/lib/openai/models/beta/beta_response_reasoning_item.rb +151 -0
- data/lib/openai/models/beta/beta_response_reasoning_summary_part_added_event.rb +110 -0
- data/lib/openai/models/beta/beta_response_reasoning_summary_part_done_event.rb +132 -0
- data/lib/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rb +88 -0
- data/lib/openai/models/beta/beta_response_reasoning_summary_text_done_event.rb +88 -0
- data/lib/openai/models/beta/beta_response_reasoning_text_delta_event.rb +87 -0
- data/lib/openai/models/beta/beta_response_reasoning_text_done_event.rb +87 -0
- data/lib/openai/models/beta/beta_response_refusal_delta_event.rb +87 -0
- data/lib/openai/models/beta/beta_response_refusal_done_event.rb +87 -0
- data/lib/openai/models/beta/beta_response_status.rb +25 -0
- data/lib/openai/models/beta/beta_response_stream_event.rb +203 -0
- data/lib/openai/models/beta/beta_response_text_config.rb +67 -0
- data/lib/openai/models/beta/beta_response_text_delta_event.rb +150 -0
- data/lib/openai/models/beta/beta_response_text_done_event.rb +150 -0
- data/lib/openai/models/beta/beta_response_tool_search_call.rb +117 -0
- data/lib/openai/models/beta/beta_response_tool_search_output_item.rb +117 -0
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +109 -0
- data/lib/openai/models/beta/beta_response_usage.rb +95 -0
- data/lib/openai/models/beta/beta_response_web_search_call_completed_event.rb +72 -0
- data/lib/openai/models/beta/beta_response_web_search_call_in_progress_event.rb +72 -0
- data/lib/openai/models/beta/beta_response_web_search_call_searching_event.rb +72 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +1432 -0
- data/lib/openai/models/beta/beta_responses_server_event.rb +212 -0
- data/lib/openai/models/beta/beta_skill_reference.rb +36 -0
- data/lib/openai/models/beta/beta_tool.rb +910 -0
- data/lib/openai/models/beta/beta_tool_choice_allowed.rb +75 -0
- data/lib/openai/models/beta/beta_tool_choice_apply_patch.rb +22 -0
- data/lib/openai/models/beta/beta_tool_choice_custom.rb +30 -0
- data/lib/openai/models/beta/beta_tool_choice_function.rb +30 -0
- data/lib/openai/models/beta/beta_tool_choice_mcp.rb +42 -0
- data/lib/openai/models/beta/beta_tool_choice_options.rb +28 -0
- data/lib/openai/models/beta/beta_tool_choice_shell.rb +22 -0
- data/lib/openai/models/beta/beta_tool_choice_types.rb +67 -0
- data/lib/openai/models/beta/beta_tool_search_tool.rb +59 -0
- data/lib/openai/models/beta/beta_web_search_preview_tool.rb +143 -0
- data/lib/openai/models/beta/beta_web_search_tool.rb +162 -0
- data/lib/openai/models/beta/response_cancel_params.rb +37 -0
- data/lib/openai/models/beta/response_compact_params.rb +549 -0
- data/lib/openai/models/beta/response_create_params.rb +1343 -0
- data/lib/openai/models/beta/response_delete_params.rb +37 -0
- data/lib/openai/models/beta/response_retrieve_params.rb +74 -0
- data/lib/openai/models/beta/responses/beta_response_item_list.rb +54 -0
- data/lib/openai/models/beta/responses/input_item_list_params.rb +96 -0
- data/lib/openai/models/beta/responses/input_token_count_params.rb +542 -0
- data/lib/openai/models/beta/responses/input_token_count_response.rb +26 -0
- data/lib/openai/models/beta/threads/run_create_params.rb +7 -14
- data/lib/openai/models/chat/chat_completion_content_part.rb +31 -1
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +31 -1
- data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +31 -1
- data/lib/openai/models/chat/chat_completion_content_part_text.rb +31 -1
- data/lib/openai/models/chat/completion_create_params.rb +200 -19
- data/lib/openai/models/chat_model.rb +3 -0
- data/lib/openai/models/completion_usage.rb +9 -1
- data/lib/openai/models/conversations/computer_screenshot_content.rb +28 -1
- data/lib/openai/models/conversations/conversation_create_params.rb +2 -2
- data/lib/openai/models/conversations/conversation_item.rb +106 -3
- data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
- data/lib/openai/models/conversations/item_create_params.rb +2 -2
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +7 -14
- data/lib/openai/models/evals/run_cancel_response.rb +16 -30
- data/lib/openai/models/evals/run_create_params.rb +16 -30
- data/lib/openai/models/evals/run_create_response.rb +16 -30
- data/lib/openai/models/evals/run_list_response.rb +16 -30
- data/lib/openai/models/evals/run_retrieve_response.rb +16 -30
- data/lib/openai/models/graders/score_model_grader.rb +7 -14
- data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +23 -1
- data/lib/openai/models/realtime/realtime_session_create_request.rb +6 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +29 -1
- data/lib/openai/models/realtime/realtime_tools_config_union.rb +23 -1
- data/lib/openai/models/reasoning.rb +47 -15
- data/lib/openai/models/reasoning_effort.rb +7 -13
- data/lib/openai/models/responses/apply_patch_tool.rb +23 -1
- data/lib/openai/models/responses/compacted_response.rb +2 -2
- data/lib/openai/models/responses/custom_tool.rb +21 -1
- data/lib/openai/models/responses/function_shell_tool.rb +23 -1
- data/lib/openai/models/responses/function_tool.rb +32 -3
- data/lib/openai/models/responses/input_token_count_params.rb +21 -8
- data/lib/openai/models/responses/namespace_tool.rb +41 -2
- data/lib/openai/models/responses/response.rb +98 -14
- data/lib/openai/models/responses/response_apply_patch_tool_call.rb +56 -1
- data/lib/openai/models/responses/response_apply_patch_tool_call_output.rb +56 -1
- data/lib/openai/models/responses/response_compact_params.rb +107 -4
- data/lib/openai/models/responses/response_create_params.rb +214 -13
- data/lib/openai/models/responses/response_custom_tool_call.rb +56 -1
- data/lib/openai/models/responses/response_custom_tool_call_output.rb +58 -1
- data/lib/openai/models/responses/response_error.rb +1 -0
- data/lib/openai/models/responses/response_function_shell_tool_call.rb +56 -1
- data/lib/openai/models/responses/response_function_shell_tool_call_output.rb +56 -1
- data/lib/openai/models/responses/response_function_tool_call.rb +56 -1
- data/lib/openai/models/responses/response_function_tool_call_output_item.rb +58 -1
- data/lib/openai/models/responses/response_input_file.rb +39 -8
- data/lib/openai/models/responses/response_input_file_content.rb +41 -8
- data/lib/openai/models/responses/response_input_image.rb +27 -1
- data/lib/openai/models/responses/response_input_image_content.rb +29 -1
- data/lib/openai/models/responses/response_input_item.rb +396 -8
- data/lib/openai/models/responses/response_input_text.rb +30 -1
- data/lib/openai/models/responses/response_input_text_content.rb +32 -1
- data/lib/openai/models/responses/response_item.rb +106 -3
- data/lib/openai/models/responses/response_item_list.rb +2 -2
- data/lib/openai/models/responses/response_output_item.rb +106 -3
- data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
- data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
- data/lib/openai/models/responses/response_reasoning_summary_part_done_event.rb +23 -1
- data/lib/openai/models/responses/response_tool_search_output_item.rb +2 -2
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +2 -2
- data/lib/openai/models/responses/response_usage.rb +9 -1
- data/lib/openai/models/responses/responses_client_event.rb +215 -13
- data/lib/openai/models/responses/tool.rb +58 -3
- data/lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb +118 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +4 -1
- data/lib/openai/resources/beta/assistants.rb +2 -2
- data/lib/openai/resources/beta/responses/input_items.rb +58 -0
- data/lib/openai/resources/beta/responses/input_tokens.rb +73 -0
- data/lib/openai/resources/beta/responses.rb +440 -0
- data/lib/openai/resources/beta/threads/runs.rb +2 -2
- data/lib/openai/resources/beta.rb +4 -0
- data/lib/openai/resources/chat/completions.rb +10 -6
- data/lib/openai/resources/conversations/items.rb +3 -3
- data/lib/openai/resources/conversations.rb +1 -1
- data/lib/openai/resources/responses/input_items.rb +1 -1
- data/lib/openai/resources/responses/input_tokens.rb +3 -3
- data/lib/openai/resources/responses.rb +22 -12
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +163 -0
- data/rbi/openai/models/beta/assistant_create_params.rbi +12 -26
- data/rbi/openai/models/beta/assistant_update_params.rbi +12 -26
- data/rbi/openai/models/beta/beta_apply_patch_tool.rbi +99 -0
- data/rbi/openai/models/beta/beta_compacted_response.rbi +120 -0
- data/rbi/openai/models/beta/beta_computer_action.rbi +593 -0
- data/rbi/openai/models/beta/beta_computer_action_list.rbi +18 -0
- data/rbi/openai/models/beta/beta_computer_tool.rbi +33 -0
- data/rbi/openai/models/beta/beta_computer_use_preview_tool.rbi +126 -0
- data/rbi/openai/models/beta/beta_container_auto.rbi +231 -0
- data/rbi/openai/models/beta/beta_container_network_policy_allowlist.rbi +81 -0
- data/rbi/openai/models/beta/beta_container_network_policy_disabled.rbi +35 -0
- data/rbi/openai/models/beta/beta_container_network_policy_domain_secret.rbi +53 -0
- data/rbi/openai/models/beta/beta_container_reference.rbi +42 -0
- data/rbi/openai/models/beta/beta_custom_tool.rbi +302 -0
- data/rbi/openai/models/beta/beta_easy_input_message.rbi +211 -0
- data/rbi/openai/models/beta/beta_file_search_tool.rbi +863 -0
- data/rbi/openai/models/beta/beta_function_shell_tool.rbi +155 -0
- data/rbi/openai/models/beta/beta_function_tool.rbi +154 -0
- data/rbi/openai/models/beta/beta_inline_skill.rbi +68 -0
- data/rbi/openai/models/beta/beta_inline_skill_source.rbi +53 -0
- data/rbi/openai/models/beta/beta_local_environment.rbi +51 -0
- data/rbi/openai/models/beta/beta_local_skill.rbi +49 -0
- data/rbi/openai/models/beta/beta_namespace_tool.rbi +252 -0
- data/rbi/openai/models/beta/beta_response.rbi +2495 -0
- data/rbi/openai/models/beta/beta_response_apply_patch_tool_call.rbi +431 -0
- data/rbi/openai/models/beta/beta_response_apply_patch_tool_call_output.rbi +277 -0
- data/rbi/openai/models/beta/beta_response_audio_delta_event.rbi +110 -0
- data/rbi/openai/models/beta/beta_response_audio_done_event.rbi +100 -0
- data/rbi/openai/models/beta/beta_response_audio_transcript_delta_event.rbi +118 -0
- data/rbi/openai/models/beta/beta_response_audio_transcript_done_event.rbi +108 -0
- data/rbi/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rbi +136 -0
- data/rbi/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rbi +134 -0
- data/rbi/openai/models/beta/beta_response_code_interpreter_call_completed_event.rbi +128 -0
- data/rbi/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rbi +128 -0
- data/rbi/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rbi +128 -0
- data/rbi/openai/models/beta/beta_response_code_interpreter_tool_call.rbi +315 -0
- data/rbi/openai/models/beta/beta_response_compaction_item.rbi +116 -0
- data/rbi/openai/models/beta/beta_response_compaction_item_param.rbi +114 -0
- data/rbi/openai/models/beta/beta_response_completed_event.rbi +111 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call.rbi +404 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +296 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rbi +62 -0
- data/rbi/openai/models/beta/beta_response_container_reference.rbi +41 -0
- data/rbi/openai/models/beta/beta_response_content.rbi +66 -0
- data/rbi/openai/models/beta/beta_response_content_part_added_event.rbi +205 -0
- data/rbi/openai/models/beta/beta_response_content_part_done_event.rbi +203 -0
- data/rbi/openai/models/beta/beta_response_conversation_param.rbi +35 -0
- data/rbi/openai/models/beta/beta_response_created_event.rbi +109 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call.rbi +242 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rbi +134 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call_input_done_event.rbi +134 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call_item.rbi +113 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call_output.rbi +303 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call_output_item.rbi +114 -0
- data/rbi/openai/models/beta/beta_response_error.rbi +165 -0
- data/rbi/openai/models/beta/beta_response_error_event.rbi +120 -0
- data/rbi/openai/models/beta/beta_response_failed_event.rbi +107 -0
- data/rbi/openai/models/beta/beta_response_file_search_call_completed_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_response_file_search_call_in_progress_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_response_file_search_call_searching_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_response_file_search_tool_call.rbi +328 -0
- data/rbi/openai/models/beta/beta_response_format_text_config.rbi +97 -0
- data/rbi/openai/models/beta/beta_response_format_text_json_schema_config.rbi +97 -0
- data/rbi/openai/models/beta/beta_response_function_call_arguments_delta_event.rbi +134 -0
- data/rbi/openai/models/beta/beta_response_function_call_arguments_done_event.rbi +140 -0
- data/rbi/openai/models/beta/beta_response_function_call_output_item.rbi +32 -0
- data/rbi/openai/models/beta/beta_response_function_call_output_item_list.rbi +21 -0
- data/rbi/openai/models/beta/beta_response_function_shell_call_output_content.rbi +160 -0
- data/rbi/openai/models/beta/beta_response_function_shell_tool_call.rbi +389 -0
- data/rbi/openai/models/beta/beta_response_function_shell_tool_call_output.rbi +470 -0
- data/rbi/openai/models/beta/beta_response_function_tool_call.rbi +310 -0
- data/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi +115 -0
- data/rbi/openai/models/beta/beta_response_function_tool_call_output_item.rbi +364 -0
- data/rbi/openai/models/beta/beta_response_function_web_search.rbi +416 -0
- data/rbi/openai/models/beta/beta_response_image_gen_call_completed_event.rbi +127 -0
- data/rbi/openai/models/beta/beta_response_image_gen_call_generating_event.rbi +127 -0
- data/rbi/openai/models/beta/beta_response_image_gen_call_in_progress_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_response_image_gen_call_partial_image_event.rbi +144 -0
- data/rbi/openai/models/beta/beta_response_in_progress_event.rbi +113 -0
- data/rbi/openai/models/beta/beta_response_includable.rbi +86 -0
- data/rbi/openai/models/beta/beta_response_incomplete_event.rbi +113 -0
- data/rbi/openai/models/beta/beta_response_inject_created_event.rbi +75 -0
- data/rbi/openai/models/beta/beta_response_inject_event.rbi +183 -0
- data/rbi/openai/models/beta/beta_response_inject_failed_event.rbi +304 -0
- data/rbi/openai/models/beta/beta_response_input.rbi +18 -0
- data/rbi/openai/models/beta/beta_response_input_audio.rbi +144 -0
- data/rbi/openai/models/beta/beta_response_input_content.rbi +31 -0
- data/rbi/openai/models/beta/beta_response_input_file.rbi +210 -0
- data/rbi/openai/models/beta/beta_response_input_file_content.rbi +211 -0
- data/rbi/openai/models/beta/beta_response_input_image.rbi +173 -0
- data/rbi/openai/models/beta/beta_response_input_image_content.rbi +191 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +5505 -0
- data/rbi/openai/models/beta/beta_response_input_message_content_list.rbi +21 -0
- data/rbi/openai/models/beta/beta_response_input_message_item.rbi +235 -0
- data/rbi/openai/models/beta/beta_response_input_text.rbi +109 -0
- data/rbi/openai/models/beta/beta_response_input_text_content.rbi +115 -0
- data/rbi/openai/models/beta/beta_response_item.rbi +2592 -0
- data/rbi/openai/models/beta/beta_response_local_environment.rbi +35 -0
- data/rbi/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rbi +137 -0
- data/rbi/openai/models/beta/beta_response_mcp_call_arguments_done_event.rbi +134 -0
- data/rbi/openai/models/beta/beta_response_mcp_call_completed_event.rbi +123 -0
- data/rbi/openai/models/beta/beta_response_mcp_call_failed_event.rbi +121 -0
- data/rbi/openai/models/beta/beta_response_mcp_call_in_progress_event.rbi +124 -0
- data/rbi/openai/models/beta/beta_response_mcp_list_tools_completed_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_response_mcp_list_tools_failed_event.rbi +124 -0
- data/rbi/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rbi +127 -0
- data/rbi/openai/models/beta/beta_response_output_audio.rbi +53 -0
- data/rbi/openai/models/beta/beta_response_output_item.rbi +2627 -0
- data/rbi/openai/models/beta/beta_response_output_item_added_event.rbi +154 -0
- data/rbi/openai/models/beta/beta_response_output_item_done_event.rbi +154 -0
- data/rbi/openai/models/beta/beta_response_output_message.rbi +267 -0
- data/rbi/openai/models/beta/beta_response_output_refusal.rbi +41 -0
- data/rbi/openai/models/beta/beta_response_output_text.rbi +479 -0
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +150 -0
- data/rbi/openai/models/beta/beta_response_prompt.rbi +122 -0
- data/rbi/openai/models/beta/beta_response_queued_event.rbi +107 -0
- data/rbi/openai/models/beta/beta_response_reasoning_item.rbi +274 -0
- data/rbi/openai/models/beta/beta_response_reasoning_summary_part_added_event.rbi +188 -0
- data/rbi/openai/models/beta/beta_response_reasoning_summary_part_done_event.rbi +243 -0
- data/rbi/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rbi +142 -0
- data/rbi/openai/models/beta/beta_response_reasoning_summary_text_done_event.rbi +142 -0
- data/rbi/openai/models/beta/beta_response_reasoning_text_delta_event.rbi +140 -0
- data/rbi/openai/models/beta/beta_response_reasoning_text_done_event.rbi +140 -0
- data/rbi/openai/models/beta/beta_response_refusal_delta_event.rbi +135 -0
- data/rbi/openai/models/beta/beta_response_refusal_done_event.rbi +135 -0
- data/rbi/openai/models/beta/beta_response_status.rbi +38 -0
- data/rbi/openai/models/beta/beta_response_stream_event.rbi +81 -0
- data/rbi/openai/models/beta/beta_response_text_config.rbi +166 -0
- data/rbi/openai/models/beta/beta_response_text_delta_event.rbi +263 -0
- data/rbi/openai/models/beta/beta_response_text_done_event.rbi +261 -0
- data/rbi/openai/models/beta/beta_response_tool_search_call.rbi +218 -0
- data/rbi/openai/models/beta/beta_response_tool_search_output_item.rbi +248 -0
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +307 -0
- data/rbi/openai/models/beta/beta_response_usage.rbi +163 -0
- data/rbi/openai/models/beta/beta_response_web_search_call_completed_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_response_web_search_call_in_progress_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_response_web_search_call_searching_event.rbi +126 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +2831 -0
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +83 -0
- data/rbi/openai/models/beta/beta_skill_reference.rbi +52 -0
- data/rbi/openai/models/beta/beta_tool.rbi +1835 -0
- data/rbi/openai/models/beta/beta_tool_choice_allowed.rbi +126 -0
- data/rbi/openai/models/beta/beta_tool_choice_apply_patch.rbi +35 -0
- data/rbi/openai/models/beta/beta_tool_choice_custom.rbi +38 -0
- data/rbi/openai/models/beta/beta_tool_choice_function.rbi +41 -0
- data/rbi/openai/models/beta/beta_tool_choice_mcp.rbi +55 -0
- data/rbi/openai/models/beta/beta_tool_choice_options.rbi +38 -0
- data/rbi/openai/models/beta/beta_tool_choice_shell.rbi +32 -0
- data/rbi/openai/models/beta/beta_tool_choice_types.rbi +134 -0
- data/rbi/openai/models/beta/beta_tool_search_tool.rbi +109 -0
- data/rbi/openai/models/beta/beta_web_search_preview_tool.rbi +311 -0
- data/rbi/openai/models/beta/beta_web_search_tool.rbi +329 -0
- data/rbi/openai/models/beta/response_cancel_params.rbi +83 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +1033 -0
- data/rbi/openai/models/beta/response_create_params.rbi +2739 -0
- data/rbi/openai/models/beta/response_delete_params.rbi +83 -0
- data/rbi/openai/models/beta/response_retrieve_params.rbi +145 -0
- data/rbi/openai/models/beta/responses/beta_response_item_list.rbi +113 -0
- data/rbi/openai/models/beta/responses/input_item_list_params.rbi +223 -0
- data/rbi/openai/models/beta/responses/input_token_count_params.rbi +1248 -0
- data/rbi/openai/models/beta/responses/input_token_count_response.rbi +37 -0
- data/rbi/openai/models/beta/threads/run_create_params.rbi +12 -26
- data/rbi/openai/models/chat/chat_completion_content_part.rbi +57 -1
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +57 -1
- data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +57 -1
- data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +70 -2
- data/rbi/openai/models/chat/completion_create_params.rbi +513 -32
- data/rbi/openai/models/chat_model.rbi +3 -0
- data/rbi/openai/models/completion_usage.rbi +21 -4
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +57 -1
- data/rbi/openai/models/conversations/conversation_create_params.rbi +9 -3
- data/rbi/openai/models/conversations/conversation_item.rbi +178 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +2 -0
- data/rbi/openai/models/conversations/item_create_params.rbi +9 -3
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +12 -26
- data/rbi/openai/models/evals/run_cancel_response.rbi +26 -52
- data/rbi/openai/models/evals/run_create_params.rbi +28 -52
- data/rbi/openai/models/evals/run_create_response.rbi +26 -52
- data/rbi/openai/models/evals/run_list_response.rbi +26 -52
- data/rbi/openai/models/evals/run_retrieve_response.rbi +26 -52
- data/rbi/openai/models/graders/score_model_grader.rbi +12 -26
- data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +60 -0
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +10 -0
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +70 -0
- data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +60 -0
- data/rbi/openai/models/reasoning.rbi +51 -26
- data/rbi/openai/models/reasoning_effort.rbi +7 -13
- data/rbi/openai/models/responses/apply_patch_tool.rbi +69 -2
- data/rbi/openai/models/responses/compacted_response.rbi +2 -0
- data/rbi/openai/models/responses/custom_tool.rbi +53 -0
- data/rbi/openai/models/responses/function_shell_tool.rbi +57 -0
- data/rbi/openai/models/responses/function_tool.rbi +68 -3
- data/rbi/openai/models/responses/input_token_count_params.rbi +32 -0
- data/rbi/openai/models/responses/namespace_tool.rbi +76 -0
- data/rbi/openai/models/responses/response.rbi +192 -3
- data/rbi/openai/models/responses/response_apply_patch_tool_call.rbi +98 -0
- data/rbi/openai/models/responses/response_apply_patch_tool_call_output.rbi +98 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +231 -0
- data/rbi/openai/models/responses/response_create_params.rbi +537 -6
- data/rbi/openai/models/responses/response_custom_tool_call.rbi +104 -0
- data/rbi/openai/models/responses/response_custom_tool_call_output.rbi +111 -1
- data/rbi/openai/models/responses/response_error.rbi +5 -0
- data/rbi/openai/models/responses/response_function_shell_tool_call.rbi +98 -0
- data/rbi/openai/models/responses/response_function_shell_tool_call_output.rbi +98 -0
- data/rbi/openai/models/responses/response_function_tool_call.rbi +104 -0
- data/rbi/openai/models/responses/response_function_tool_call_output_item.rbi +104 -0
- data/rbi/openai/models/responses/response_input_file.rbi +77 -10
- data/rbi/openai/models/responses/response_input_file_content.rbi +83 -10
- data/rbi/openai/models/responses/response_input_image.rbi +57 -1
- data/rbi/openai/models/responses/response_input_image_content.rbi +63 -1
- data/rbi/openai/models/responses/response_input_item.rbi +748 -8
- data/rbi/openai/models/responses/response_input_text.rbi +70 -2
- data/rbi/openai/models/responses/response_input_text_content.rbi +76 -2
- data/rbi/openai/models/responses/response_item.rbi +178 -0
- data/rbi/openai/models/responses/response_item_list.rbi +2 -0
- data/rbi/openai/models/responses/response_output_item.rbi +178 -0
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +2 -0
- data/rbi/openai/models/responses/response_output_item_done_event.rbi +2 -0
- data/rbi/openai/models/responses/response_reasoning_summary_part_done_event.rbi +58 -1
- data/rbi/openai/models/responses/response_tool_search_output_item.rbi +1 -0
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +3 -0
- data/rbi/openai/models/responses/response_usage.rbi +16 -2
- data/rbi/openai/models/responses/responses_client_event.rbi +537 -6
- data/rbi/openai/models/responses/tool.rbi +142 -1
- data/rbi/openai/models/webhooks/safety_identifier_blocked_webhook_event.rbi +209 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +2 -1
- data/rbi/openai/resources/beta/assistants.rbi +12 -26
- data/rbi/openai/resources/beta/responses/input_items.rbi +58 -0
- data/rbi/openai/resources/beta/responses/input_tokens.rbi +154 -0
- data/rbi/openai/resources/beta/responses.rbi +903 -0
- data/rbi/openai/resources/beta/threads/runs.rbi +12 -26
- data/rbi/openai/resources/beta.rbi +3 -0
- data/rbi/openai/resources/chat/completions.rbi +48 -28
- data/rbi/openai/resources/conversations/items.rbi +3 -1
- data/rbi/openai/resources/conversations.rbi +3 -1
- data/rbi/openai/resources/responses/input_tokens.rbi +2 -0
- data/rbi/openai/resources/responses.rbi +54 -2
- data/rbi/openai/resources/webhooks.rbi +2 -1
- data/sig/openai/client.rbs +1 -1
- data/sig/openai/internal/transport/base_client.rbs +2 -2
- data/sig/openai/models/beta/beta_apply_patch_tool.rbs +40 -0
- data/sig/openai/models/beta/beta_compacted_response.rbs +44 -0
- data/sig/openai/models/beta/beta_computer_action.rbs +259 -0
- data/sig/openai/models/beta/beta_computer_action_list.rbs +12 -0
- data/sig/openai/models/beta/beta_computer_tool.rbs +17 -0
- data/sig/openai/models/beta/beta_computer_use_preview_tool.rbs +53 -0
- data/sig/openai/models/beta/beta_container_auto.rbs +86 -0
- data/sig/openai/models/beta/beta_container_network_policy_allowlist.rbs +38 -0
- data/sig/openai/models/beta/beta_container_network_policy_disabled.rbs +17 -0
- data/sig/openai/models/beta/beta_container_network_policy_domain_secret.rbs +22 -0
- data/sig/openai/models/beta/beta_container_reference.rbs +23 -0
- data/sig/openai/models/beta/beta_custom_tool.rbs +126 -0
- data/sig/openai/models/beta/beta_easy_input_message.rbs +87 -0
- data/sig/openai/models/beta/beta_file_search_tool.rbs +298 -0
- data/sig/openai/models/beta/beta_function_shell_tool.rbs +56 -0
- data/sig/openai/models/beta/beta_function_tool.rbs +72 -0
- data/sig/openai/models/beta/beta_inline_skill.rbs +39 -0
- data/sig/openai/models/beta/beta_inline_skill_source.rbs +30 -0
- data/sig/openai/models/beta/beta_local_environment.rbs +30 -0
- data/sig/openai/models/beta/beta_local_skill.rbs +26 -0
- data/sig/openai/models/beta/beta_namespace_tool.rbs +114 -0
- data/sig/openai/models/beta/beta_response.rbs +860 -0
- data/sig/openai/models/beta/beta_response_apply_patch_tool_call.rbs +177 -0
- data/sig/openai/models/beta/beta_response_apply_patch_tool_call_output.rbs +118 -0
- data/sig/openai/models/beta/beta_response_audio_delta_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_audio_done_event.rbs +44 -0
- data/sig/openai/models/beta/beta_response_audio_transcript_delta_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_audio_transcript_done_event.rbs +44 -0
- data/sig/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_code_interpreter_call_completed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_code_interpreter_tool_call.rbs +113 -0
- data/sig/openai/models/beta/beta_response_compaction_item.rbs +60 -0
- data/sig/openai/models/beta/beta_response_compaction_item_param.rbs +49 -0
- data/sig/openai/models/beta/beta_response_completed_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call.rbs +118 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +107 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rbs +34 -0
- data/sig/openai/models/beta/beta_response_container_reference.rbs +23 -0
- data/sig/openai/models/beta/beta_response_content.rbs +33 -0
- data/sig/openai/models/beta/beta_response_content_part_added_event.rbs +87 -0
- data/sig/openai/models/beta/beta_response_content_part_done_event.rbs +87 -0
- data/sig/openai/models/beta/beta_response_conversation_param.rbs +17 -0
- data/sig/openai/models/beta/beta_response_created_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call.rbs +105 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call_input_done_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call_item.rbs +54 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call_output.rbs +116 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call_output_item.rbs +54 -0
- data/sig/openai/models/beta/beta_response_error.rbs +73 -0
- data/sig/openai/models/beta/beta_response_error_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_failed_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_file_search_call_completed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_file_search_call_in_progress_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_file_search_call_searching_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_file_search_tool_call.rbs +127 -0
- data/sig/openai/models/beta/beta_response_format_text_config.rbs +38 -0
- data/sig/openai/models/beta/beta_response_format_text_json_schema_config.rbs +46 -0
- data/sig/openai/models/beta/beta_response_function_call_arguments_delta_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_function_call_arguments_done_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_function_call_output_item.rbs +18 -0
- data/sig/openai/models/beta/beta_response_function_call_output_item_list.rbs +12 -0
- data/sig/openai/models/beta/beta_response_function_shell_call_output_content.rbs +66 -0
- data/sig/openai/models/beta/beta_response_function_shell_tool_call.rbs +161 -0
- data/sig/openai/models/beta/beta_response_function_shell_tool_call_output.rbs +190 -0
- data/sig/openai/models/beta/beta_response_function_tool_call.rbs +126 -0
- data/sig/openai/models/beta/beta_response_function_tool_call_item.rbs +54 -0
- data/sig/openai/models/beta/beta_response_function_tool_call_output_item.rbs +138 -0
- data/sig/openai/models/beta/beta_response_function_web_search.rbs +165 -0
- data/sig/openai/models/beta/beta_response_image_gen_call_completed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_image_gen_call_generating_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_image_gen_call_in_progress_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_image_gen_call_partial_image_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_in_progress_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_includable.rbs +32 -0
- data/sig/openai/models/beta/beta_response_incomplete_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_inject_created_event.rbs +41 -0
- data/sig/openai/models/beta/beta_response_inject_event.rbs +34 -0
- data/sig/openai/models/beta/beta_response_inject_failed_event.rbs +84 -0
- data/sig/openai/models/beta/beta_response_input.rbs +12 -0
- data/sig/openai/models/beta/beta_response_input_audio.rbs +62 -0
- data/sig/openai/models/beta/beta_response_input_content.rbs +18 -0
- data/sig/openai/models/beta/beta_response_input_file.rbs +90 -0
- data/sig/openai/models/beta/beta_response_input_file_content.rbs +80 -0
- data/sig/openai/models/beta/beta_response_input_image.rbs +71 -0
- data/sig/openai/models/beta/beta_response_input_image_content.rbs +67 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +2064 -0
- data/sig/openai/models/beta/beta_response_input_message_content_list.rbs +12 -0
- data/sig/openai/models/beta/beta_response_input_message_item.rbs +87 -0
- data/sig/openai/models/beta/beta_response_input_text.rbs +48 -0
- data/sig/openai/models/beta/beta_response_input_text_content.rbs +44 -0
- data/sig/openai/models/beta/beta_response_item.rbs +1097 -0
- data/sig/openai/models/beta/beta_response_local_environment.rbs +17 -0
- data/sig/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_mcp_call_arguments_done_event.rbs +59 -0
- data/sig/openai/models/beta/beta_response_mcp_call_completed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_mcp_call_failed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_mcp_call_in_progress_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_mcp_list_tools_completed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_mcp_list_tools_failed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_output_audio.rbs +30 -0
- data/sig/openai/models/beta/beta_response_output_item.rbs +1096 -0
- data/sig/openai/models/beta/beta_response_output_item_added_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_output_item_done_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_output_message.rbs +97 -0
- data/sig/openai/models/beta/beta_response_output_refusal.rbs +19 -0
- data/sig/openai/models/beta/beta_response_output_text.rbs +243 -0
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +69 -0
- data/sig/openai/models/beta/beta_response_prompt.rbs +46 -0
- data/sig/openai/models/beta/beta_response_queued_event.rbs +49 -0
- data/sig/openai/models/beta/beta_response_reasoning_item.rbs +108 -0
- data/sig/openai/models/beta/beta_response_reasoning_summary_part_added_event.rbs +76 -0
- data/sig/openai/models/beta/beta_response_reasoning_summary_part_done_event.rbs +95 -0
- data/sig/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_reasoning_summary_text_done_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_reasoning_text_delta_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_reasoning_text_done_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_refusal_delta_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_refusal_done_event.rbs +64 -0
- data/sig/openai/models/beta/beta_response_status.rbs +23 -0
- data/sig/openai/models/beta/beta_response_stream_event.rbs +68 -0
- data/sig/openai/models/beta/beta_response_text_config.rbs +45 -0
- data/sig/openai/models/beta/beta_response_text_delta_event.rbs +116 -0
- data/sig/openai/models/beta/beta_response_text_done_event.rbs +116 -0
- data/sig/openai/models/beta/beta_response_tool_search_call.rbs +98 -0
- data/sig/openai/models/beta/beta_response_tool_search_output_item.rbs +98 -0
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +91 -0
- data/sig/openai/models/beta/beta_response_usage.rbs +73 -0
- data/sig/openai/models/beta/beta_response_web_search_call_completed_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_web_search_call_in_progress_event.rbs +54 -0
- data/sig/openai/models/beta/beta_response_web_search_call_searching_event.rbs +54 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +804 -0
- data/sig/openai/models/beta/beta_responses_server_event.rbs +70 -0
- data/sig/openai/models/beta/beta_skill_reference.rbs +32 -0
- data/sig/openai/models/beta/beta_tool.rbs +634 -0
- data/sig/openai/models/beta/beta_tool_choice_allowed.rbs +45 -0
- data/sig/openai/models/beta/beta_tool_choice_apply_patch.rbs +17 -0
- data/sig/openai/models/beta/beta_tool_choice_custom.rbs +19 -0
- data/sig/openai/models/beta/beta_tool_choice_function.rbs +19 -0
- data/sig/openai/models/beta/beta_tool_choice_mcp.rbs +26 -0
- data/sig/openai/models/beta/beta_tool_choice_options.rbs +19 -0
- data/sig/openai/models/beta/beta_tool_choice_shell.rbs +17 -0
- data/sig/openai/models/beta/beta_tool_choice_types.rbs +47 -0
- data/sig/openai/models/beta/beta_tool_search_tool.rbs +54 -0
- data/sig/openai/models/beta/beta_web_search_preview_tool.rbs +118 -0
- data/sig/openai/models/beta/beta_web_search_tool.rbs +127 -0
- data/sig/openai/models/beta/response_cancel_params.rbs +47 -0
- data/sig/openai/models/beta/response_compact_params.rbs +368 -0
- data/sig/openai/models/beta/response_create_params.rbs +804 -0
- data/sig/openai/models/beta/response_delete_params.rbs +47 -0
- data/sig/openai/models/beta/response_retrieve_params.rbs +70 -0
- data/sig/openai/models/beta/responses/beta_response_item_list.rbs +44 -0
- data/sig/openai/models/beta/responses/input_item_list_params.rbs +92 -0
- data/sig/openai/models/beta/responses/input_token_count_params.rbs +325 -0
- data/sig/openai/models/beta/responses/input_token_count_response.rbs +26 -0
- data/sig/openai/models/chat/chat_completion_content_part.rbs +21 -2
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +21 -2
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +21 -2
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +32 -3
- data/sig/openai/models/chat/completion_create_params.rbs +153 -3
- data/sig/openai/models/chat_model.rbs +7 -1
- data/sig/openai/models/completion_usage.rbs +15 -2
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +21 -2
- data/sig/openai/models/conversations/conversation_item.rbs +87 -0
- data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +16 -0
- data/sig/openai/models/realtime/realtime_session_create_request.rbs +4 -0
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +20 -0
- data/sig/openai/models/realtime/realtime_tools_config_union.rbs +16 -0
- data/sig/openai/models/reasoning.rbs +20 -0
- data/sig/openai/models/reasoning_effort.rbs +3 -1
- data/sig/openai/models/responses/apply_patch_tool.rbs +26 -3
- data/sig/openai/models/responses/custom_tool.rbs +16 -0
- data/sig/openai/models/responses/function_shell_tool.rbs +16 -0
- data/sig/openai/models/responses/function_tool.rbs +23 -2
- data/sig/openai/models/responses/input_token_count_params.rbs +12 -0
- data/sig/openai/models/responses/namespace_tool.rbs +21 -0
- data/sig/openai/models/responses/response.rbs +64 -0
- data/sig/openai/models/responses/response_apply_patch_tool_call.rbs +37 -0
- data/sig/openai/models/responses/response_apply_patch_tool_call_output.rbs +37 -0
- data/sig/openai/models/responses/response_compact_params.rbs +63 -1
- data/sig/openai/models/responses/response_create_params.rbs +165 -3
- data/sig/openai/models/responses/response_custom_tool_call.rbs +37 -0
- data/sig/openai/models/responses/response_custom_tool_call_output.rbs +39 -2
- data/sig/openai/models/responses/response_error.rbs +2 -0
- data/sig/openai/models/responses/response_function_shell_tool_call.rbs +37 -0
- data/sig/openai/models/responses/response_function_shell_tool_call_output.rbs +37 -0
- data/sig/openai/models/responses/response_function_tool_call.rbs +37 -0
- data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +37 -0
- data/sig/openai/models/responses/response_input_file.rbs +23 -3
- data/sig/openai/models/responses/response_input_file_content.rbs +19 -3
- data/sig/openai/models/responses/response_input_image.rbs +21 -2
- data/sig/openai/models/responses/response_input_image_content.rbs +17 -2
- data/sig/openai/models/responses/response_input_item.rbs +274 -2
- data/sig/openai/models/responses/response_input_text.rbs +32 -3
- data/sig/openai/models/responses/response_input_text_content.rbs +28 -3
- data/sig/openai/models/responses/response_item.rbs +87 -0
- data/sig/openai/models/responses/response_output_item.rbs +87 -0
- data/sig/openai/models/responses/response_reasoning_summary_part_done_event.rbs +21 -2
- data/sig/openai/models/responses/response_usage.rbs +12 -3
- data/sig/openai/models/responses/responses_client_event.rbs +165 -3
- data/sig/openai/models/responses/tool.rbs +45 -2
- data/sig/openai/models/webhooks/safety_identifier_blocked_webhook_event.rbs +99 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
- data/sig/openai/resources/beta/responses/input_items.rbs +21 -0
- data/sig/openai/resources/beta/responses/input_tokens.rbs +28 -0
- data/sig/openai/resources/beta/responses.rbs +128 -0
- data/sig/openai/resources/beta.rbs +2 -0
- data/sig/openai/resources/chat/completions.rbs +2 -0
- data/sig/openai/resources/responses.rbs +3 -0
- data/sig/openai/resources/webhooks.rbs +2 -1
- metadata +491 -2
|
@@ -0,0 +1,1835 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
BetaTool = Beta::BetaTool
|
|
6
|
+
|
|
7
|
+
module Beta
|
|
8
|
+
# A tool that can be used to generate a response.
|
|
9
|
+
module BetaTool
|
|
10
|
+
extend OpenAI::Internal::Type::Union
|
|
11
|
+
|
|
12
|
+
Variants =
|
|
13
|
+
T.type_alias do
|
|
14
|
+
T.any(
|
|
15
|
+
OpenAI::Beta::BetaFunctionTool,
|
|
16
|
+
OpenAI::Beta::BetaFileSearchTool,
|
|
17
|
+
OpenAI::Beta::BetaComputerTool,
|
|
18
|
+
OpenAI::Beta::BetaComputerUsePreviewTool,
|
|
19
|
+
OpenAI::Beta::BetaTool::Mcp,
|
|
20
|
+
OpenAI::Beta::BetaTool::CodeInterpreter,
|
|
21
|
+
OpenAI::Beta::BetaTool::ProgrammaticToolCalling,
|
|
22
|
+
OpenAI::Beta::BetaTool::ImageGeneration,
|
|
23
|
+
OpenAI::Beta::BetaTool::LocalShell,
|
|
24
|
+
OpenAI::Beta::BetaFunctionShellTool,
|
|
25
|
+
OpenAI::Beta::BetaCustomTool,
|
|
26
|
+
OpenAI::Beta::BetaNamespaceTool,
|
|
27
|
+
OpenAI::Beta::BetaToolSearchTool,
|
|
28
|
+
OpenAI::Beta::BetaApplyPatchTool,
|
|
29
|
+
OpenAI::Beta::BetaWebSearchTool,
|
|
30
|
+
OpenAI::Beta::BetaWebSearchPreviewTool
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
35
|
+
OrHash =
|
|
36
|
+
T.type_alias do
|
|
37
|
+
T.any(OpenAI::Beta::BetaTool::Mcp, OpenAI::Internal::AnyHash)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# A label for this MCP server, used to identify it in tool calls.
|
|
41
|
+
sig { returns(String) }
|
|
42
|
+
attr_accessor :server_label
|
|
43
|
+
|
|
44
|
+
# The type of the MCP tool. Always `mcp`.
|
|
45
|
+
sig { returns(Symbol) }
|
|
46
|
+
attr_accessor :type
|
|
47
|
+
|
|
48
|
+
# The tool invocation context(s).
|
|
49
|
+
sig do
|
|
50
|
+
returns(
|
|
51
|
+
T.nilable(
|
|
52
|
+
T::Array[OpenAI::Beta::BetaTool::Mcp::AllowedCaller::OrSymbol]
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
attr_accessor :allowed_callers
|
|
57
|
+
|
|
58
|
+
# List of allowed tool names or a filter object.
|
|
59
|
+
sig do
|
|
60
|
+
returns(
|
|
61
|
+
T.nilable(
|
|
62
|
+
T.any(
|
|
63
|
+
T::Array[String],
|
|
64
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter
|
|
65
|
+
)
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
attr_accessor :allowed_tools
|
|
70
|
+
|
|
71
|
+
# An OAuth access token that can be used with a remote MCP server, either with a
|
|
72
|
+
# custom MCP server URL or a service connector. Your application must handle the
|
|
73
|
+
# OAuth authorization flow and provide the token here.
|
|
74
|
+
sig { returns(T.nilable(String)) }
|
|
75
|
+
attr_reader :authorization
|
|
76
|
+
|
|
77
|
+
sig { params(authorization: String).void }
|
|
78
|
+
attr_writer :authorization
|
|
79
|
+
|
|
80
|
+
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
81
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
82
|
+
# service connectors
|
|
83
|
+
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
84
|
+
#
|
|
85
|
+
# Currently supported `connector_id` values are:
|
|
86
|
+
#
|
|
87
|
+
# - Dropbox: `connector_dropbox`
|
|
88
|
+
# - Gmail: `connector_gmail`
|
|
89
|
+
# - Google Calendar: `connector_googlecalendar`
|
|
90
|
+
# - Google Drive: `connector_googledrive`
|
|
91
|
+
# - Microsoft Teams: `connector_microsoftteams`
|
|
92
|
+
# - Outlook Calendar: `connector_outlookcalendar`
|
|
93
|
+
# - Outlook Email: `connector_outlookemail`
|
|
94
|
+
# - SharePoint: `connector_sharepoint`
|
|
95
|
+
sig do
|
|
96
|
+
returns(
|
|
97
|
+
T.nilable(OpenAI::Beta::BetaTool::Mcp::ConnectorID::OrSymbol)
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
attr_reader :connector_id
|
|
101
|
+
|
|
102
|
+
sig do
|
|
103
|
+
params(
|
|
104
|
+
connector_id: OpenAI::Beta::BetaTool::Mcp::ConnectorID::OrSymbol
|
|
105
|
+
).void
|
|
106
|
+
end
|
|
107
|
+
attr_writer :connector_id
|
|
108
|
+
|
|
109
|
+
# Whether this MCP tool is deferred and discovered via tool search.
|
|
110
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
111
|
+
attr_reader :defer_loading
|
|
112
|
+
|
|
113
|
+
sig { params(defer_loading: T::Boolean).void }
|
|
114
|
+
attr_writer :defer_loading
|
|
115
|
+
|
|
116
|
+
# Optional HTTP headers to send to the MCP server. Use for authentication or other
|
|
117
|
+
# purposes.
|
|
118
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
119
|
+
attr_accessor :headers
|
|
120
|
+
|
|
121
|
+
# Specify which of the MCP server's tools require approval.
|
|
122
|
+
sig do
|
|
123
|
+
returns(
|
|
124
|
+
T.nilable(
|
|
125
|
+
T.any(
|
|
126
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter,
|
|
127
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting::OrSymbol
|
|
128
|
+
)
|
|
129
|
+
)
|
|
130
|
+
)
|
|
131
|
+
end
|
|
132
|
+
attr_accessor :require_approval
|
|
133
|
+
|
|
134
|
+
# Optional description of the MCP server, used to provide more context.
|
|
135
|
+
sig { returns(T.nilable(String)) }
|
|
136
|
+
attr_reader :server_description
|
|
137
|
+
|
|
138
|
+
sig { params(server_description: String).void }
|
|
139
|
+
attr_writer :server_description
|
|
140
|
+
|
|
141
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
142
|
+
# must be provided.
|
|
143
|
+
sig { returns(T.nilable(String)) }
|
|
144
|
+
attr_reader :server_url
|
|
145
|
+
|
|
146
|
+
sig { params(server_url: String).void }
|
|
147
|
+
attr_writer :server_url
|
|
148
|
+
|
|
149
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
150
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
151
|
+
sig { returns(T.nilable(String)) }
|
|
152
|
+
attr_reader :tunnel_id
|
|
153
|
+
|
|
154
|
+
sig { params(tunnel_id: String).void }
|
|
155
|
+
attr_writer :tunnel_id
|
|
156
|
+
|
|
157
|
+
# Give the model access to additional tools via remote Model Context Protocol
|
|
158
|
+
# (MCP) servers.
|
|
159
|
+
# [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
|
|
160
|
+
sig do
|
|
161
|
+
params(
|
|
162
|
+
server_label: String,
|
|
163
|
+
allowed_callers:
|
|
164
|
+
T.nilable(
|
|
165
|
+
T::Array[OpenAI::Beta::BetaTool::Mcp::AllowedCaller::OrSymbol]
|
|
166
|
+
),
|
|
167
|
+
allowed_tools:
|
|
168
|
+
T.nilable(
|
|
169
|
+
T.any(
|
|
170
|
+
T::Array[String],
|
|
171
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter::OrHash
|
|
172
|
+
)
|
|
173
|
+
),
|
|
174
|
+
authorization: String,
|
|
175
|
+
connector_id: OpenAI::Beta::BetaTool::Mcp::ConnectorID::OrSymbol,
|
|
176
|
+
defer_loading: T::Boolean,
|
|
177
|
+
headers: T.nilable(T::Hash[Symbol, String]),
|
|
178
|
+
require_approval:
|
|
179
|
+
T.nilable(
|
|
180
|
+
T.any(
|
|
181
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::OrHash,
|
|
182
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting::OrSymbol
|
|
183
|
+
)
|
|
184
|
+
),
|
|
185
|
+
server_description: String,
|
|
186
|
+
server_url: String,
|
|
187
|
+
tunnel_id: String,
|
|
188
|
+
type: Symbol
|
|
189
|
+
).returns(T.attached_class)
|
|
190
|
+
end
|
|
191
|
+
def self.new(
|
|
192
|
+
# A label for this MCP server, used to identify it in tool calls.
|
|
193
|
+
server_label:,
|
|
194
|
+
# The tool invocation context(s).
|
|
195
|
+
allowed_callers: nil,
|
|
196
|
+
# List of allowed tool names or a filter object.
|
|
197
|
+
allowed_tools: nil,
|
|
198
|
+
# An OAuth access token that can be used with a remote MCP server, either with a
|
|
199
|
+
# custom MCP server URL or a service connector. Your application must handle the
|
|
200
|
+
# OAuth authorization flow and provide the token here.
|
|
201
|
+
authorization: nil,
|
|
202
|
+
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
203
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
204
|
+
# service connectors
|
|
205
|
+
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
206
|
+
#
|
|
207
|
+
# Currently supported `connector_id` values are:
|
|
208
|
+
#
|
|
209
|
+
# - Dropbox: `connector_dropbox`
|
|
210
|
+
# - Gmail: `connector_gmail`
|
|
211
|
+
# - Google Calendar: `connector_googlecalendar`
|
|
212
|
+
# - Google Drive: `connector_googledrive`
|
|
213
|
+
# - Microsoft Teams: `connector_microsoftteams`
|
|
214
|
+
# - Outlook Calendar: `connector_outlookcalendar`
|
|
215
|
+
# - Outlook Email: `connector_outlookemail`
|
|
216
|
+
# - SharePoint: `connector_sharepoint`
|
|
217
|
+
connector_id: nil,
|
|
218
|
+
# Whether this MCP tool is deferred and discovered via tool search.
|
|
219
|
+
defer_loading: nil,
|
|
220
|
+
# Optional HTTP headers to send to the MCP server. Use for authentication or other
|
|
221
|
+
# purposes.
|
|
222
|
+
headers: nil,
|
|
223
|
+
# Specify which of the MCP server's tools require approval.
|
|
224
|
+
require_approval: nil,
|
|
225
|
+
# Optional description of the MCP server, used to provide more context.
|
|
226
|
+
server_description: nil,
|
|
227
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
228
|
+
# must be provided.
|
|
229
|
+
server_url: nil,
|
|
230
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
231
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
232
|
+
tunnel_id: nil,
|
|
233
|
+
# The type of the MCP tool. Always `mcp`.
|
|
234
|
+
type: :mcp
|
|
235
|
+
)
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
sig do
|
|
239
|
+
override.returns(
|
|
240
|
+
{
|
|
241
|
+
server_label: String,
|
|
242
|
+
type: Symbol,
|
|
243
|
+
allowed_callers:
|
|
244
|
+
T.nilable(
|
|
245
|
+
T::Array[
|
|
246
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedCaller::OrSymbol
|
|
247
|
+
]
|
|
248
|
+
),
|
|
249
|
+
allowed_tools:
|
|
250
|
+
T.nilable(
|
|
251
|
+
T.any(
|
|
252
|
+
T::Array[String],
|
|
253
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter
|
|
254
|
+
)
|
|
255
|
+
),
|
|
256
|
+
authorization: String,
|
|
257
|
+
connector_id:
|
|
258
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::OrSymbol,
|
|
259
|
+
defer_loading: T::Boolean,
|
|
260
|
+
headers: T.nilable(T::Hash[Symbol, String]),
|
|
261
|
+
require_approval:
|
|
262
|
+
T.nilable(
|
|
263
|
+
T.any(
|
|
264
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter,
|
|
265
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting::OrSymbol
|
|
266
|
+
)
|
|
267
|
+
),
|
|
268
|
+
server_description: String,
|
|
269
|
+
server_url: String,
|
|
270
|
+
tunnel_id: String
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
end
|
|
274
|
+
def to_hash
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
module AllowedCaller
|
|
278
|
+
extend OpenAI::Internal::Type::Enum
|
|
279
|
+
|
|
280
|
+
TaggedSymbol =
|
|
281
|
+
T.type_alias do
|
|
282
|
+
T.all(Symbol, OpenAI::Beta::BetaTool::Mcp::AllowedCaller)
|
|
283
|
+
end
|
|
284
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
285
|
+
|
|
286
|
+
DIRECT =
|
|
287
|
+
T.let(
|
|
288
|
+
:direct,
|
|
289
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedCaller::TaggedSymbol
|
|
290
|
+
)
|
|
291
|
+
PROGRAMMATIC =
|
|
292
|
+
T.let(
|
|
293
|
+
:programmatic,
|
|
294
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedCaller::TaggedSymbol
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
sig do
|
|
298
|
+
override.returns(
|
|
299
|
+
T::Array[
|
|
300
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedCaller::TaggedSymbol
|
|
301
|
+
]
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
def self.values
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# List of allowed tool names or a filter object.
|
|
309
|
+
module AllowedTools
|
|
310
|
+
extend OpenAI::Internal::Type::Union
|
|
311
|
+
|
|
312
|
+
Variants =
|
|
313
|
+
T.type_alias do
|
|
314
|
+
T.any(
|
|
315
|
+
T::Array[String],
|
|
316
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter
|
|
317
|
+
)
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
class McpToolFilter < OpenAI::Internal::Type::BaseModel
|
|
321
|
+
OrHash =
|
|
322
|
+
T.type_alias do
|
|
323
|
+
T.any(
|
|
324
|
+
OpenAI::Beta::BetaTool::Mcp::AllowedTools::McpToolFilter,
|
|
325
|
+
OpenAI::Internal::AnyHash
|
|
326
|
+
)
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
330
|
+
# is
|
|
331
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
332
|
+
# it will match this filter.
|
|
333
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
334
|
+
attr_reader :read_only
|
|
335
|
+
|
|
336
|
+
sig { params(read_only: T::Boolean).void }
|
|
337
|
+
attr_writer :read_only
|
|
338
|
+
|
|
339
|
+
# List of allowed tool names.
|
|
340
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
341
|
+
attr_reader :tool_names
|
|
342
|
+
|
|
343
|
+
sig { params(tool_names: T::Array[String]).void }
|
|
344
|
+
attr_writer :tool_names
|
|
345
|
+
|
|
346
|
+
# A filter object to specify which tools are allowed.
|
|
347
|
+
sig do
|
|
348
|
+
params(
|
|
349
|
+
read_only: T::Boolean,
|
|
350
|
+
tool_names: T::Array[String]
|
|
351
|
+
).returns(T.attached_class)
|
|
352
|
+
end
|
|
353
|
+
def self.new(
|
|
354
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
355
|
+
# is
|
|
356
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
357
|
+
# it will match this filter.
|
|
358
|
+
read_only: nil,
|
|
359
|
+
# List of allowed tool names.
|
|
360
|
+
tool_names: nil
|
|
361
|
+
)
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
sig do
|
|
365
|
+
override.returns(
|
|
366
|
+
{ read_only: T::Boolean, tool_names: T::Array[String] }
|
|
367
|
+
)
|
|
368
|
+
end
|
|
369
|
+
def to_hash
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
sig do
|
|
374
|
+
override.returns(
|
|
375
|
+
T::Array[OpenAI::Beta::BetaTool::Mcp::AllowedTools::Variants]
|
|
376
|
+
)
|
|
377
|
+
end
|
|
378
|
+
def self.variants
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
StringArray =
|
|
382
|
+
T.let(
|
|
383
|
+
OpenAI::Internal::Type::ArrayOf[String],
|
|
384
|
+
OpenAI::Internal::Type::Converter
|
|
385
|
+
)
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
389
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
390
|
+
# service connectors
|
|
391
|
+
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
392
|
+
#
|
|
393
|
+
# Currently supported `connector_id` values are:
|
|
394
|
+
#
|
|
395
|
+
# - Dropbox: `connector_dropbox`
|
|
396
|
+
# - Gmail: `connector_gmail`
|
|
397
|
+
# - Google Calendar: `connector_googlecalendar`
|
|
398
|
+
# - Google Drive: `connector_googledrive`
|
|
399
|
+
# - Microsoft Teams: `connector_microsoftteams`
|
|
400
|
+
# - Outlook Calendar: `connector_outlookcalendar`
|
|
401
|
+
# - Outlook Email: `connector_outlookemail`
|
|
402
|
+
# - SharePoint: `connector_sharepoint`
|
|
403
|
+
module ConnectorID
|
|
404
|
+
extend OpenAI::Internal::Type::Enum
|
|
405
|
+
|
|
406
|
+
TaggedSymbol =
|
|
407
|
+
T.type_alias do
|
|
408
|
+
T.all(Symbol, OpenAI::Beta::BetaTool::Mcp::ConnectorID)
|
|
409
|
+
end
|
|
410
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
411
|
+
|
|
412
|
+
CONNECTOR_DROPBOX =
|
|
413
|
+
T.let(
|
|
414
|
+
:connector_dropbox,
|
|
415
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
416
|
+
)
|
|
417
|
+
CONNECTOR_GMAIL =
|
|
418
|
+
T.let(
|
|
419
|
+
:connector_gmail,
|
|
420
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
421
|
+
)
|
|
422
|
+
CONNECTOR_GOOGLECALENDAR =
|
|
423
|
+
T.let(
|
|
424
|
+
:connector_googlecalendar,
|
|
425
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
426
|
+
)
|
|
427
|
+
CONNECTOR_GOOGLEDRIVE =
|
|
428
|
+
T.let(
|
|
429
|
+
:connector_googledrive,
|
|
430
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
431
|
+
)
|
|
432
|
+
CONNECTOR_MICROSOFTTEAMS =
|
|
433
|
+
T.let(
|
|
434
|
+
:connector_microsoftteams,
|
|
435
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
436
|
+
)
|
|
437
|
+
CONNECTOR_OUTLOOKCALENDAR =
|
|
438
|
+
T.let(
|
|
439
|
+
:connector_outlookcalendar,
|
|
440
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
441
|
+
)
|
|
442
|
+
CONNECTOR_OUTLOOKEMAIL =
|
|
443
|
+
T.let(
|
|
444
|
+
:connector_outlookemail,
|
|
445
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
446
|
+
)
|
|
447
|
+
CONNECTOR_SHAREPOINT =
|
|
448
|
+
T.let(
|
|
449
|
+
:connector_sharepoint,
|
|
450
|
+
OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
sig do
|
|
454
|
+
override.returns(
|
|
455
|
+
T::Array[OpenAI::Beta::BetaTool::Mcp::ConnectorID::TaggedSymbol]
|
|
456
|
+
)
|
|
457
|
+
end
|
|
458
|
+
def self.values
|
|
459
|
+
end
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
# Specify which of the MCP server's tools require approval.
|
|
463
|
+
module RequireApproval
|
|
464
|
+
extend OpenAI::Internal::Type::Union
|
|
465
|
+
|
|
466
|
+
Variants =
|
|
467
|
+
T.type_alias do
|
|
468
|
+
T.any(
|
|
469
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter,
|
|
470
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting::TaggedSymbol
|
|
471
|
+
)
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel
|
|
475
|
+
OrHash =
|
|
476
|
+
T.type_alias do
|
|
477
|
+
T.any(
|
|
478
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter,
|
|
479
|
+
OpenAI::Internal::AnyHash
|
|
480
|
+
)
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
# A filter object to specify which tools are allowed.
|
|
484
|
+
sig do
|
|
485
|
+
returns(
|
|
486
|
+
T.nilable(
|
|
487
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always
|
|
488
|
+
)
|
|
489
|
+
)
|
|
490
|
+
end
|
|
491
|
+
attr_reader :always
|
|
492
|
+
|
|
493
|
+
sig do
|
|
494
|
+
params(
|
|
495
|
+
always:
|
|
496
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always::OrHash
|
|
497
|
+
).void
|
|
498
|
+
end
|
|
499
|
+
attr_writer :always
|
|
500
|
+
|
|
501
|
+
# A filter object to specify which tools are allowed.
|
|
502
|
+
sig do
|
|
503
|
+
returns(
|
|
504
|
+
T.nilable(
|
|
505
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
|
506
|
+
)
|
|
507
|
+
)
|
|
508
|
+
end
|
|
509
|
+
attr_reader :never
|
|
510
|
+
|
|
511
|
+
sig do
|
|
512
|
+
params(
|
|
513
|
+
never:
|
|
514
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never::OrHash
|
|
515
|
+
).void
|
|
516
|
+
end
|
|
517
|
+
attr_writer :never
|
|
518
|
+
|
|
519
|
+
# Specify which of the MCP server's tools require approval. Can be `always`,
|
|
520
|
+
# `never`, or a filter object associated with tools that require approval.
|
|
521
|
+
sig do
|
|
522
|
+
params(
|
|
523
|
+
always:
|
|
524
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always::OrHash,
|
|
525
|
+
never:
|
|
526
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never::OrHash
|
|
527
|
+
).returns(T.attached_class)
|
|
528
|
+
end
|
|
529
|
+
def self.new(
|
|
530
|
+
# A filter object to specify which tools are allowed.
|
|
531
|
+
always: nil,
|
|
532
|
+
# A filter object to specify which tools are allowed.
|
|
533
|
+
never: nil
|
|
534
|
+
)
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
sig do
|
|
538
|
+
override.returns(
|
|
539
|
+
{
|
|
540
|
+
always:
|
|
541
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always,
|
|
542
|
+
never:
|
|
543
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
|
544
|
+
}
|
|
545
|
+
)
|
|
546
|
+
end
|
|
547
|
+
def to_hash
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
class Always < OpenAI::Internal::Type::BaseModel
|
|
551
|
+
OrHash =
|
|
552
|
+
T.type_alias do
|
|
553
|
+
T.any(
|
|
554
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Always,
|
|
555
|
+
OpenAI::Internal::AnyHash
|
|
556
|
+
)
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
560
|
+
# is
|
|
561
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
562
|
+
# it will match this filter.
|
|
563
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
564
|
+
attr_reader :read_only
|
|
565
|
+
|
|
566
|
+
sig { params(read_only: T::Boolean).void }
|
|
567
|
+
attr_writer :read_only
|
|
568
|
+
|
|
569
|
+
# List of allowed tool names.
|
|
570
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
571
|
+
attr_reader :tool_names
|
|
572
|
+
|
|
573
|
+
sig { params(tool_names: T::Array[String]).void }
|
|
574
|
+
attr_writer :tool_names
|
|
575
|
+
|
|
576
|
+
# A filter object to specify which tools are allowed.
|
|
577
|
+
sig do
|
|
578
|
+
params(
|
|
579
|
+
read_only: T::Boolean,
|
|
580
|
+
tool_names: T::Array[String]
|
|
581
|
+
).returns(T.attached_class)
|
|
582
|
+
end
|
|
583
|
+
def self.new(
|
|
584
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
585
|
+
# is
|
|
586
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
587
|
+
# it will match this filter.
|
|
588
|
+
read_only: nil,
|
|
589
|
+
# List of allowed tool names.
|
|
590
|
+
tool_names: nil
|
|
591
|
+
)
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
sig do
|
|
595
|
+
override.returns(
|
|
596
|
+
{ read_only: T::Boolean, tool_names: T::Array[String] }
|
|
597
|
+
)
|
|
598
|
+
end
|
|
599
|
+
def to_hash
|
|
600
|
+
end
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
class Never < OpenAI::Internal::Type::BaseModel
|
|
604
|
+
OrHash =
|
|
605
|
+
T.type_alias do
|
|
606
|
+
T.any(
|
|
607
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalFilter::Never,
|
|
608
|
+
OpenAI::Internal::AnyHash
|
|
609
|
+
)
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
613
|
+
# is
|
|
614
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
615
|
+
# it will match this filter.
|
|
616
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
617
|
+
attr_reader :read_only
|
|
618
|
+
|
|
619
|
+
sig { params(read_only: T::Boolean).void }
|
|
620
|
+
attr_writer :read_only
|
|
621
|
+
|
|
622
|
+
# List of allowed tool names.
|
|
623
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
624
|
+
attr_reader :tool_names
|
|
625
|
+
|
|
626
|
+
sig { params(tool_names: T::Array[String]).void }
|
|
627
|
+
attr_writer :tool_names
|
|
628
|
+
|
|
629
|
+
# A filter object to specify which tools are allowed.
|
|
630
|
+
sig do
|
|
631
|
+
params(
|
|
632
|
+
read_only: T::Boolean,
|
|
633
|
+
tool_names: T::Array[String]
|
|
634
|
+
).returns(T.attached_class)
|
|
635
|
+
end
|
|
636
|
+
def self.new(
|
|
637
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
638
|
+
# is
|
|
639
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
640
|
+
# it will match this filter.
|
|
641
|
+
read_only: nil,
|
|
642
|
+
# List of allowed tool names.
|
|
643
|
+
tool_names: nil
|
|
644
|
+
)
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
sig do
|
|
648
|
+
override.returns(
|
|
649
|
+
{ read_only: T::Boolean, tool_names: T::Array[String] }
|
|
650
|
+
)
|
|
651
|
+
end
|
|
652
|
+
def to_hash
|
|
653
|
+
end
|
|
654
|
+
end
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
# Specify a single approval policy for all tools. One of `always` or `never`. When
|
|
658
|
+
# set to `always`, all tools will require approval. When set to `never`, all tools
|
|
659
|
+
# will not require approval.
|
|
660
|
+
module McpToolApprovalSetting
|
|
661
|
+
extend OpenAI::Internal::Type::Enum
|
|
662
|
+
|
|
663
|
+
TaggedSymbol =
|
|
664
|
+
T.type_alias do
|
|
665
|
+
T.all(
|
|
666
|
+
Symbol,
|
|
667
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting
|
|
668
|
+
)
|
|
669
|
+
end
|
|
670
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
671
|
+
|
|
672
|
+
ALWAYS =
|
|
673
|
+
T.let(
|
|
674
|
+
:always,
|
|
675
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting::TaggedSymbol
|
|
676
|
+
)
|
|
677
|
+
NEVER =
|
|
678
|
+
T.let(
|
|
679
|
+
:never,
|
|
680
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting::TaggedSymbol
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
sig do
|
|
684
|
+
override.returns(
|
|
685
|
+
T::Array[
|
|
686
|
+
OpenAI::Beta::BetaTool::Mcp::RequireApproval::McpToolApprovalSetting::TaggedSymbol
|
|
687
|
+
]
|
|
688
|
+
)
|
|
689
|
+
end
|
|
690
|
+
def self.values
|
|
691
|
+
end
|
|
692
|
+
end
|
|
693
|
+
|
|
694
|
+
sig do
|
|
695
|
+
override.returns(
|
|
696
|
+
T::Array[OpenAI::Beta::BetaTool::Mcp::RequireApproval::Variants]
|
|
697
|
+
)
|
|
698
|
+
end
|
|
699
|
+
def self.variants
|
|
700
|
+
end
|
|
701
|
+
end
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
705
|
+
OrHash =
|
|
706
|
+
T.type_alias do
|
|
707
|
+
T.any(
|
|
708
|
+
OpenAI::Beta::BetaTool::CodeInterpreter,
|
|
709
|
+
OpenAI::Internal::AnyHash
|
|
710
|
+
)
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
# The code interpreter container. Can be a container ID or an object that
|
|
714
|
+
# specifies uploaded file IDs to make available to your code, along with an
|
|
715
|
+
# optional `memory_limit` setting.
|
|
716
|
+
sig do
|
|
717
|
+
returns(
|
|
718
|
+
T.any(
|
|
719
|
+
String,
|
|
720
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto
|
|
721
|
+
)
|
|
722
|
+
)
|
|
723
|
+
end
|
|
724
|
+
attr_accessor :container
|
|
725
|
+
|
|
726
|
+
# The type of the code interpreter tool. Always `code_interpreter`.
|
|
727
|
+
sig { returns(Symbol) }
|
|
728
|
+
attr_accessor :type
|
|
729
|
+
|
|
730
|
+
# The tool invocation context(s).
|
|
731
|
+
sig do
|
|
732
|
+
returns(
|
|
733
|
+
T.nilable(
|
|
734
|
+
T::Array[
|
|
735
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::AllowedCaller::OrSymbol
|
|
736
|
+
]
|
|
737
|
+
)
|
|
738
|
+
)
|
|
739
|
+
end
|
|
740
|
+
attr_accessor :allowed_callers
|
|
741
|
+
|
|
742
|
+
# A tool that runs Python code to help generate a response to a prompt.
|
|
743
|
+
sig do
|
|
744
|
+
params(
|
|
745
|
+
container:
|
|
746
|
+
T.any(
|
|
747
|
+
String,
|
|
748
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::OrHash
|
|
749
|
+
),
|
|
750
|
+
allowed_callers:
|
|
751
|
+
T.nilable(
|
|
752
|
+
T::Array[
|
|
753
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::AllowedCaller::OrSymbol
|
|
754
|
+
]
|
|
755
|
+
),
|
|
756
|
+
type: Symbol
|
|
757
|
+
).returns(T.attached_class)
|
|
758
|
+
end
|
|
759
|
+
def self.new(
|
|
760
|
+
# The code interpreter container. Can be a container ID or an object that
|
|
761
|
+
# specifies uploaded file IDs to make available to your code, along with an
|
|
762
|
+
# optional `memory_limit` setting.
|
|
763
|
+
container:,
|
|
764
|
+
# The tool invocation context(s).
|
|
765
|
+
allowed_callers: nil,
|
|
766
|
+
# The type of the code interpreter tool. Always `code_interpreter`.
|
|
767
|
+
type: :code_interpreter
|
|
768
|
+
)
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
sig do
|
|
772
|
+
override.returns(
|
|
773
|
+
{
|
|
774
|
+
container:
|
|
775
|
+
T.any(
|
|
776
|
+
String,
|
|
777
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto
|
|
778
|
+
),
|
|
779
|
+
type: Symbol,
|
|
780
|
+
allowed_callers:
|
|
781
|
+
T.nilable(
|
|
782
|
+
T::Array[
|
|
783
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::AllowedCaller::OrSymbol
|
|
784
|
+
]
|
|
785
|
+
)
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
end
|
|
789
|
+
def to_hash
|
|
790
|
+
end
|
|
791
|
+
|
|
792
|
+
# The code interpreter container. Can be a container ID or an object that
|
|
793
|
+
# specifies uploaded file IDs to make available to your code, along with an
|
|
794
|
+
# optional `memory_limit` setting.
|
|
795
|
+
module Container
|
|
796
|
+
extend OpenAI::Internal::Type::Union
|
|
797
|
+
|
|
798
|
+
Variants =
|
|
799
|
+
T.type_alias do
|
|
800
|
+
T.any(
|
|
801
|
+
String,
|
|
802
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto
|
|
803
|
+
)
|
|
804
|
+
end
|
|
805
|
+
|
|
806
|
+
class CodeInterpreterToolAuto < OpenAI::Internal::Type::BaseModel
|
|
807
|
+
OrHash =
|
|
808
|
+
T.type_alias do
|
|
809
|
+
T.any(
|
|
810
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto,
|
|
811
|
+
OpenAI::Internal::AnyHash
|
|
812
|
+
)
|
|
813
|
+
end
|
|
814
|
+
|
|
815
|
+
# Always `auto`.
|
|
816
|
+
sig { returns(Symbol) }
|
|
817
|
+
attr_accessor :type
|
|
818
|
+
|
|
819
|
+
# An optional list of uploaded files to make available to your code.
|
|
820
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
821
|
+
attr_reader :file_ids
|
|
822
|
+
|
|
823
|
+
sig { params(file_ids: T::Array[String]).void }
|
|
824
|
+
attr_writer :file_ids
|
|
825
|
+
|
|
826
|
+
# The memory limit for the code interpreter container.
|
|
827
|
+
sig do
|
|
828
|
+
returns(
|
|
829
|
+
T.nilable(
|
|
830
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::OrSymbol
|
|
831
|
+
)
|
|
832
|
+
)
|
|
833
|
+
end
|
|
834
|
+
attr_accessor :memory_limit
|
|
835
|
+
|
|
836
|
+
# Network access policy for the container.
|
|
837
|
+
sig do
|
|
838
|
+
returns(
|
|
839
|
+
T.nilable(
|
|
840
|
+
T.any(
|
|
841
|
+
OpenAI::Beta::BetaContainerNetworkPolicyDisabled,
|
|
842
|
+
OpenAI::Beta::BetaContainerNetworkPolicyAllowlist
|
|
843
|
+
)
|
|
844
|
+
)
|
|
845
|
+
)
|
|
846
|
+
end
|
|
847
|
+
attr_reader :network_policy
|
|
848
|
+
|
|
849
|
+
sig do
|
|
850
|
+
params(
|
|
851
|
+
network_policy:
|
|
852
|
+
T.any(
|
|
853
|
+
OpenAI::Beta::BetaContainerNetworkPolicyDisabled::OrHash,
|
|
854
|
+
OpenAI::Beta::BetaContainerNetworkPolicyAllowlist::OrHash
|
|
855
|
+
)
|
|
856
|
+
).void
|
|
857
|
+
end
|
|
858
|
+
attr_writer :network_policy
|
|
859
|
+
|
|
860
|
+
# Configuration for a code interpreter container. Optionally specify the IDs of
|
|
861
|
+
# the files to run the code on.
|
|
862
|
+
sig do
|
|
863
|
+
params(
|
|
864
|
+
file_ids: T::Array[String],
|
|
865
|
+
memory_limit:
|
|
866
|
+
T.nilable(
|
|
867
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::OrSymbol
|
|
868
|
+
),
|
|
869
|
+
network_policy:
|
|
870
|
+
T.any(
|
|
871
|
+
OpenAI::Beta::BetaContainerNetworkPolicyDisabled::OrHash,
|
|
872
|
+
OpenAI::Beta::BetaContainerNetworkPolicyAllowlist::OrHash
|
|
873
|
+
),
|
|
874
|
+
type: Symbol
|
|
875
|
+
).returns(T.attached_class)
|
|
876
|
+
end
|
|
877
|
+
def self.new(
|
|
878
|
+
# An optional list of uploaded files to make available to your code.
|
|
879
|
+
file_ids: nil,
|
|
880
|
+
# The memory limit for the code interpreter container.
|
|
881
|
+
memory_limit: nil,
|
|
882
|
+
# Network access policy for the container.
|
|
883
|
+
network_policy: nil,
|
|
884
|
+
# Always `auto`.
|
|
885
|
+
type: :auto
|
|
886
|
+
)
|
|
887
|
+
end
|
|
888
|
+
|
|
889
|
+
sig do
|
|
890
|
+
override.returns(
|
|
891
|
+
{
|
|
892
|
+
type: Symbol,
|
|
893
|
+
file_ids: T::Array[String],
|
|
894
|
+
memory_limit:
|
|
895
|
+
T.nilable(
|
|
896
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::OrSymbol
|
|
897
|
+
),
|
|
898
|
+
network_policy:
|
|
899
|
+
T.any(
|
|
900
|
+
OpenAI::Beta::BetaContainerNetworkPolicyDisabled,
|
|
901
|
+
OpenAI::Beta::BetaContainerNetworkPolicyAllowlist
|
|
902
|
+
)
|
|
903
|
+
}
|
|
904
|
+
)
|
|
905
|
+
end
|
|
906
|
+
def to_hash
|
|
907
|
+
end
|
|
908
|
+
|
|
909
|
+
# The memory limit for the code interpreter container.
|
|
910
|
+
module MemoryLimit
|
|
911
|
+
extend OpenAI::Internal::Type::Enum
|
|
912
|
+
|
|
913
|
+
TaggedSymbol =
|
|
914
|
+
T.type_alias do
|
|
915
|
+
T.all(
|
|
916
|
+
Symbol,
|
|
917
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit
|
|
918
|
+
)
|
|
919
|
+
end
|
|
920
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
921
|
+
|
|
922
|
+
MEMORY_LIMIT_1G =
|
|
923
|
+
T.let(
|
|
924
|
+
:"1g",
|
|
925
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::TaggedSymbol
|
|
926
|
+
)
|
|
927
|
+
MEMORY_LIMIT_4G =
|
|
928
|
+
T.let(
|
|
929
|
+
:"4g",
|
|
930
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::TaggedSymbol
|
|
931
|
+
)
|
|
932
|
+
MEMORY_LIMIT_16G =
|
|
933
|
+
T.let(
|
|
934
|
+
:"16g",
|
|
935
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::TaggedSymbol
|
|
936
|
+
)
|
|
937
|
+
MEMORY_LIMIT_64G =
|
|
938
|
+
T.let(
|
|
939
|
+
:"64g",
|
|
940
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::TaggedSymbol
|
|
941
|
+
)
|
|
942
|
+
|
|
943
|
+
sig do
|
|
944
|
+
override.returns(
|
|
945
|
+
T::Array[
|
|
946
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::MemoryLimit::TaggedSymbol
|
|
947
|
+
]
|
|
948
|
+
)
|
|
949
|
+
end
|
|
950
|
+
def self.values
|
|
951
|
+
end
|
|
952
|
+
end
|
|
953
|
+
|
|
954
|
+
# Network access policy for the container.
|
|
955
|
+
module NetworkPolicy
|
|
956
|
+
extend OpenAI::Internal::Type::Union
|
|
957
|
+
|
|
958
|
+
Variants =
|
|
959
|
+
T.type_alias do
|
|
960
|
+
T.any(
|
|
961
|
+
OpenAI::Beta::BetaContainerNetworkPolicyDisabled,
|
|
962
|
+
OpenAI::Beta::BetaContainerNetworkPolicyAllowlist
|
|
963
|
+
)
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
sig do
|
|
967
|
+
override.returns(
|
|
968
|
+
T::Array[
|
|
969
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::CodeInterpreterToolAuto::NetworkPolicy::Variants
|
|
970
|
+
]
|
|
971
|
+
)
|
|
972
|
+
end
|
|
973
|
+
def self.variants
|
|
974
|
+
end
|
|
975
|
+
end
|
|
976
|
+
end
|
|
977
|
+
|
|
978
|
+
sig do
|
|
979
|
+
override.returns(
|
|
980
|
+
T::Array[
|
|
981
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::Container::Variants
|
|
982
|
+
]
|
|
983
|
+
)
|
|
984
|
+
end
|
|
985
|
+
def self.variants
|
|
986
|
+
end
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
module AllowedCaller
|
|
990
|
+
extend OpenAI::Internal::Type::Enum
|
|
991
|
+
|
|
992
|
+
TaggedSymbol =
|
|
993
|
+
T.type_alias do
|
|
994
|
+
T.all(
|
|
995
|
+
Symbol,
|
|
996
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::AllowedCaller
|
|
997
|
+
)
|
|
998
|
+
end
|
|
999
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1000
|
+
|
|
1001
|
+
DIRECT =
|
|
1002
|
+
T.let(
|
|
1003
|
+
:direct,
|
|
1004
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::AllowedCaller::TaggedSymbol
|
|
1005
|
+
)
|
|
1006
|
+
PROGRAMMATIC =
|
|
1007
|
+
T.let(
|
|
1008
|
+
:programmatic,
|
|
1009
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::AllowedCaller::TaggedSymbol
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
sig do
|
|
1013
|
+
override.returns(
|
|
1014
|
+
T::Array[
|
|
1015
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::AllowedCaller::TaggedSymbol
|
|
1016
|
+
]
|
|
1017
|
+
)
|
|
1018
|
+
end
|
|
1019
|
+
def self.values
|
|
1020
|
+
end
|
|
1021
|
+
end
|
|
1022
|
+
end
|
|
1023
|
+
|
|
1024
|
+
class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
|
|
1025
|
+
OrHash =
|
|
1026
|
+
T.type_alias do
|
|
1027
|
+
T.any(
|
|
1028
|
+
OpenAI::Beta::BetaTool::ProgrammaticToolCalling,
|
|
1029
|
+
OpenAI::Internal::AnyHash
|
|
1030
|
+
)
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
# The type of the tool. Always `programmatic_tool_calling`.
|
|
1034
|
+
sig { returns(Symbol) }
|
|
1035
|
+
attr_accessor :type
|
|
1036
|
+
|
|
1037
|
+
sig { params(type: Symbol).returns(T.attached_class) }
|
|
1038
|
+
def self.new(
|
|
1039
|
+
# The type of the tool. Always `programmatic_tool_calling`.
|
|
1040
|
+
type: :programmatic_tool_calling
|
|
1041
|
+
)
|
|
1042
|
+
end
|
|
1043
|
+
|
|
1044
|
+
sig { override.returns({ type: Symbol }) }
|
|
1045
|
+
def to_hash
|
|
1046
|
+
end
|
|
1047
|
+
end
|
|
1048
|
+
|
|
1049
|
+
class ImageGeneration < OpenAI::Internal::Type::BaseModel
|
|
1050
|
+
OrHash =
|
|
1051
|
+
T.type_alias do
|
|
1052
|
+
T.any(
|
|
1053
|
+
OpenAI::Beta::BetaTool::ImageGeneration,
|
|
1054
|
+
OpenAI::Internal::AnyHash
|
|
1055
|
+
)
|
|
1056
|
+
end
|
|
1057
|
+
|
|
1058
|
+
# The type of the image generation tool. Always `image_generation`.
|
|
1059
|
+
sig { returns(Symbol) }
|
|
1060
|
+
attr_accessor :type
|
|
1061
|
+
|
|
1062
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
1063
|
+
sig do
|
|
1064
|
+
returns(
|
|
1065
|
+
T.nilable(
|
|
1066
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Action::OrSymbol
|
|
1067
|
+
)
|
|
1068
|
+
)
|
|
1069
|
+
end
|
|
1070
|
+
attr_reader :action
|
|
1071
|
+
|
|
1072
|
+
sig do
|
|
1073
|
+
params(
|
|
1074
|
+
action: OpenAI::Beta::BetaTool::ImageGeneration::Action::OrSymbol
|
|
1075
|
+
).void
|
|
1076
|
+
end
|
|
1077
|
+
attr_writer :action
|
|
1078
|
+
|
|
1079
|
+
# Allows to set transparency for the background of the generated image(s). This
|
|
1080
|
+
# parameter is only supported for GPT image models that support transparent
|
|
1081
|
+
# backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
1082
|
+
# When `auto` is used, the model will automatically determine the best background
|
|
1083
|
+
# for the image.
|
|
1084
|
+
#
|
|
1085
|
+
# `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
1086
|
+
# backgrounds. Requests with `background` set to `transparent` will return an
|
|
1087
|
+
# error for these models; use `opaque` or `auto` instead.
|
|
1088
|
+
#
|
|
1089
|
+
# If `transparent`, the output format needs to support transparency, so it should
|
|
1090
|
+
# be set to either `png` (default value) or `webp`.
|
|
1091
|
+
sig do
|
|
1092
|
+
returns(
|
|
1093
|
+
T.nilable(
|
|
1094
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::OrSymbol
|
|
1095
|
+
)
|
|
1096
|
+
)
|
|
1097
|
+
end
|
|
1098
|
+
attr_reader :background
|
|
1099
|
+
|
|
1100
|
+
sig do
|
|
1101
|
+
params(
|
|
1102
|
+
background:
|
|
1103
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::OrSymbol
|
|
1104
|
+
).void
|
|
1105
|
+
end
|
|
1106
|
+
attr_writer :background
|
|
1107
|
+
|
|
1108
|
+
# Control how much effort the model will exert to match the style and features,
|
|
1109
|
+
# especially facial features, of input images. This parameter is only supported
|
|
1110
|
+
# for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for
|
|
1111
|
+
# `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
|
|
1112
|
+
sig do
|
|
1113
|
+
returns(
|
|
1114
|
+
T.nilable(
|
|
1115
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::OrSymbol
|
|
1116
|
+
)
|
|
1117
|
+
)
|
|
1118
|
+
end
|
|
1119
|
+
attr_accessor :input_fidelity
|
|
1120
|
+
|
|
1121
|
+
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
1122
|
+
# `file_id` (string, optional).
|
|
1123
|
+
sig do
|
|
1124
|
+
returns(
|
|
1125
|
+
T.nilable(OpenAI::Beta::BetaTool::ImageGeneration::InputImageMask)
|
|
1126
|
+
)
|
|
1127
|
+
end
|
|
1128
|
+
attr_reader :input_image_mask
|
|
1129
|
+
|
|
1130
|
+
sig do
|
|
1131
|
+
params(
|
|
1132
|
+
input_image_mask:
|
|
1133
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputImageMask::OrHash
|
|
1134
|
+
).void
|
|
1135
|
+
end
|
|
1136
|
+
attr_writer :input_image_mask
|
|
1137
|
+
|
|
1138
|
+
# The image generation model to use. Default: `gpt-image-1`.
|
|
1139
|
+
sig do
|
|
1140
|
+
returns(
|
|
1141
|
+
T.nilable(
|
|
1142
|
+
T.any(
|
|
1143
|
+
String,
|
|
1144
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::OrSymbol
|
|
1145
|
+
)
|
|
1146
|
+
)
|
|
1147
|
+
)
|
|
1148
|
+
end
|
|
1149
|
+
attr_reader :model
|
|
1150
|
+
|
|
1151
|
+
sig do
|
|
1152
|
+
params(
|
|
1153
|
+
model:
|
|
1154
|
+
T.any(
|
|
1155
|
+
String,
|
|
1156
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::OrSymbol
|
|
1157
|
+
)
|
|
1158
|
+
).void
|
|
1159
|
+
end
|
|
1160
|
+
attr_writer :model
|
|
1161
|
+
|
|
1162
|
+
# Moderation level for the generated image. Default: `auto`.
|
|
1163
|
+
sig do
|
|
1164
|
+
returns(
|
|
1165
|
+
T.nilable(
|
|
1166
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation::OrSymbol
|
|
1167
|
+
)
|
|
1168
|
+
)
|
|
1169
|
+
end
|
|
1170
|
+
attr_reader :moderation
|
|
1171
|
+
|
|
1172
|
+
sig do
|
|
1173
|
+
params(
|
|
1174
|
+
moderation:
|
|
1175
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation::OrSymbol
|
|
1176
|
+
).void
|
|
1177
|
+
end
|
|
1178
|
+
attr_writer :moderation
|
|
1179
|
+
|
|
1180
|
+
# Compression level for the output image. Default: 100.
|
|
1181
|
+
sig { returns(T.nilable(Integer)) }
|
|
1182
|
+
attr_reader :output_compression
|
|
1183
|
+
|
|
1184
|
+
sig { params(output_compression: Integer).void }
|
|
1185
|
+
attr_writer :output_compression
|
|
1186
|
+
|
|
1187
|
+
# The output format of the generated image. One of `png`, `webp`, or `jpeg`.
|
|
1188
|
+
# Default: `png`.
|
|
1189
|
+
sig do
|
|
1190
|
+
returns(
|
|
1191
|
+
T.nilable(
|
|
1192
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::OrSymbol
|
|
1193
|
+
)
|
|
1194
|
+
)
|
|
1195
|
+
end
|
|
1196
|
+
attr_reader :output_format
|
|
1197
|
+
|
|
1198
|
+
sig do
|
|
1199
|
+
params(
|
|
1200
|
+
output_format:
|
|
1201
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::OrSymbol
|
|
1202
|
+
).void
|
|
1203
|
+
end
|
|
1204
|
+
attr_writer :output_format
|
|
1205
|
+
|
|
1206
|
+
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
1207
|
+
# to 3.
|
|
1208
|
+
sig { returns(T.nilable(Integer)) }
|
|
1209
|
+
attr_reader :partial_images
|
|
1210
|
+
|
|
1211
|
+
sig { params(partial_images: Integer).void }
|
|
1212
|
+
attr_writer :partial_images
|
|
1213
|
+
|
|
1214
|
+
# The quality of the generated image. One of `low`, `medium`, `high`, or `auto`.
|
|
1215
|
+
# Default: `auto`.
|
|
1216
|
+
sig do
|
|
1217
|
+
returns(
|
|
1218
|
+
T.nilable(
|
|
1219
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::OrSymbol
|
|
1220
|
+
)
|
|
1221
|
+
)
|
|
1222
|
+
end
|
|
1223
|
+
attr_reader :quality
|
|
1224
|
+
|
|
1225
|
+
sig do
|
|
1226
|
+
params(
|
|
1227
|
+
quality:
|
|
1228
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::OrSymbol
|
|
1229
|
+
).void
|
|
1230
|
+
end
|
|
1231
|
+
attr_writer :quality
|
|
1232
|
+
|
|
1233
|
+
# The size of the generated images. For `gpt-image-2` and
|
|
1234
|
+
# `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
1235
|
+
# strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
1236
|
+
# and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
1237
|
+
# `2560x1440` are experimental, and the maximum supported resolution is
|
|
1238
|
+
# `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
1239
|
+
# edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
1240
|
+
# supported by the GPT image models; `auto` is supported for models that allow
|
|
1241
|
+
# automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
1242
|
+
# `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
1243
|
+
# `1024x1792`.
|
|
1244
|
+
sig do
|
|
1245
|
+
returns(
|
|
1246
|
+
T.nilable(
|
|
1247
|
+
T.any(
|
|
1248
|
+
String,
|
|
1249
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::OrSymbol
|
|
1250
|
+
)
|
|
1251
|
+
)
|
|
1252
|
+
)
|
|
1253
|
+
end
|
|
1254
|
+
attr_reader :size
|
|
1255
|
+
|
|
1256
|
+
sig do
|
|
1257
|
+
params(
|
|
1258
|
+
size:
|
|
1259
|
+
T.any(
|
|
1260
|
+
String,
|
|
1261
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::OrSymbol
|
|
1262
|
+
)
|
|
1263
|
+
).void
|
|
1264
|
+
end
|
|
1265
|
+
attr_writer :size
|
|
1266
|
+
|
|
1267
|
+
# A tool that generates images using the GPT image models.
|
|
1268
|
+
sig do
|
|
1269
|
+
params(
|
|
1270
|
+
action: OpenAI::Beta::BetaTool::ImageGeneration::Action::OrSymbol,
|
|
1271
|
+
background:
|
|
1272
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::OrSymbol,
|
|
1273
|
+
input_fidelity:
|
|
1274
|
+
T.nilable(
|
|
1275
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::OrSymbol
|
|
1276
|
+
),
|
|
1277
|
+
input_image_mask:
|
|
1278
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputImageMask::OrHash,
|
|
1279
|
+
model:
|
|
1280
|
+
T.any(
|
|
1281
|
+
String,
|
|
1282
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::OrSymbol
|
|
1283
|
+
),
|
|
1284
|
+
moderation:
|
|
1285
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation::OrSymbol,
|
|
1286
|
+
output_compression: Integer,
|
|
1287
|
+
output_format:
|
|
1288
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::OrSymbol,
|
|
1289
|
+
partial_images: Integer,
|
|
1290
|
+
quality:
|
|
1291
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::OrSymbol,
|
|
1292
|
+
size:
|
|
1293
|
+
T.any(
|
|
1294
|
+
String,
|
|
1295
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::OrSymbol
|
|
1296
|
+
),
|
|
1297
|
+
type: Symbol
|
|
1298
|
+
).returns(T.attached_class)
|
|
1299
|
+
end
|
|
1300
|
+
def self.new(
|
|
1301
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
1302
|
+
action: nil,
|
|
1303
|
+
# Allows to set transparency for the background of the generated image(s). This
|
|
1304
|
+
# parameter is only supported for GPT image models that support transparent
|
|
1305
|
+
# backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
1306
|
+
# When `auto` is used, the model will automatically determine the best background
|
|
1307
|
+
# for the image.
|
|
1308
|
+
#
|
|
1309
|
+
# `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
1310
|
+
# backgrounds. Requests with `background` set to `transparent` will return an
|
|
1311
|
+
# error for these models; use `opaque` or `auto` instead.
|
|
1312
|
+
#
|
|
1313
|
+
# If `transparent`, the output format needs to support transparency, so it should
|
|
1314
|
+
# be set to either `png` (default value) or `webp`.
|
|
1315
|
+
background: nil,
|
|
1316
|
+
# Control how much effort the model will exert to match the style and features,
|
|
1317
|
+
# especially facial features, of input images. This parameter is only supported
|
|
1318
|
+
# for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for
|
|
1319
|
+
# `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
|
|
1320
|
+
input_fidelity: nil,
|
|
1321
|
+
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
1322
|
+
# `file_id` (string, optional).
|
|
1323
|
+
input_image_mask: nil,
|
|
1324
|
+
# The image generation model to use. Default: `gpt-image-1`.
|
|
1325
|
+
model: nil,
|
|
1326
|
+
# Moderation level for the generated image. Default: `auto`.
|
|
1327
|
+
moderation: nil,
|
|
1328
|
+
# Compression level for the output image. Default: 100.
|
|
1329
|
+
output_compression: nil,
|
|
1330
|
+
# The output format of the generated image. One of `png`, `webp`, or `jpeg`.
|
|
1331
|
+
# Default: `png`.
|
|
1332
|
+
output_format: nil,
|
|
1333
|
+
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
1334
|
+
# to 3.
|
|
1335
|
+
partial_images: nil,
|
|
1336
|
+
# The quality of the generated image. One of `low`, `medium`, `high`, or `auto`.
|
|
1337
|
+
# Default: `auto`.
|
|
1338
|
+
quality: nil,
|
|
1339
|
+
# The size of the generated images. For `gpt-image-2` and
|
|
1340
|
+
# `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
1341
|
+
# strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
1342
|
+
# and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
1343
|
+
# `2560x1440` are experimental, and the maximum supported resolution is
|
|
1344
|
+
# `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
1345
|
+
# edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
1346
|
+
# supported by the GPT image models; `auto` is supported for models that allow
|
|
1347
|
+
# automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
1348
|
+
# `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
1349
|
+
# `1024x1792`.
|
|
1350
|
+
size: nil,
|
|
1351
|
+
# The type of the image generation tool. Always `image_generation`.
|
|
1352
|
+
type: :image_generation
|
|
1353
|
+
)
|
|
1354
|
+
end
|
|
1355
|
+
|
|
1356
|
+
sig do
|
|
1357
|
+
override.returns(
|
|
1358
|
+
{
|
|
1359
|
+
type: Symbol,
|
|
1360
|
+
action:
|
|
1361
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Action::OrSymbol,
|
|
1362
|
+
background:
|
|
1363
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::OrSymbol,
|
|
1364
|
+
input_fidelity:
|
|
1365
|
+
T.nilable(
|
|
1366
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::OrSymbol
|
|
1367
|
+
),
|
|
1368
|
+
input_image_mask:
|
|
1369
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputImageMask,
|
|
1370
|
+
model:
|
|
1371
|
+
T.any(
|
|
1372
|
+
String,
|
|
1373
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::OrSymbol
|
|
1374
|
+
),
|
|
1375
|
+
moderation:
|
|
1376
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation::OrSymbol,
|
|
1377
|
+
output_compression: Integer,
|
|
1378
|
+
output_format:
|
|
1379
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::OrSymbol,
|
|
1380
|
+
partial_images: Integer,
|
|
1381
|
+
quality:
|
|
1382
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::OrSymbol,
|
|
1383
|
+
size:
|
|
1384
|
+
T.any(
|
|
1385
|
+
String,
|
|
1386
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::OrSymbol
|
|
1387
|
+
)
|
|
1388
|
+
}
|
|
1389
|
+
)
|
|
1390
|
+
end
|
|
1391
|
+
def to_hash
|
|
1392
|
+
end
|
|
1393
|
+
|
|
1394
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
1395
|
+
module Action
|
|
1396
|
+
extend OpenAI::Internal::Type::Enum
|
|
1397
|
+
|
|
1398
|
+
TaggedSymbol =
|
|
1399
|
+
T.type_alias do
|
|
1400
|
+
T.all(Symbol, OpenAI::Beta::BetaTool::ImageGeneration::Action)
|
|
1401
|
+
end
|
|
1402
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1403
|
+
|
|
1404
|
+
GENERATE =
|
|
1405
|
+
T.let(
|
|
1406
|
+
:generate,
|
|
1407
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Action::TaggedSymbol
|
|
1408
|
+
)
|
|
1409
|
+
EDIT =
|
|
1410
|
+
T.let(
|
|
1411
|
+
:edit,
|
|
1412
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Action::TaggedSymbol
|
|
1413
|
+
)
|
|
1414
|
+
AUTO =
|
|
1415
|
+
T.let(
|
|
1416
|
+
:auto,
|
|
1417
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Action::TaggedSymbol
|
|
1418
|
+
)
|
|
1419
|
+
|
|
1420
|
+
sig do
|
|
1421
|
+
override.returns(
|
|
1422
|
+
T::Array[
|
|
1423
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Action::TaggedSymbol
|
|
1424
|
+
]
|
|
1425
|
+
)
|
|
1426
|
+
end
|
|
1427
|
+
def self.values
|
|
1428
|
+
end
|
|
1429
|
+
end
|
|
1430
|
+
|
|
1431
|
+
# Allows to set transparency for the background of the generated image(s). This
|
|
1432
|
+
# parameter is only supported for GPT image models that support transparent
|
|
1433
|
+
# backgrounds. Must be one of `transparent`, `opaque`, or `auto` (default value).
|
|
1434
|
+
# When `auto` is used, the model will automatically determine the best background
|
|
1435
|
+
# for the image.
|
|
1436
|
+
#
|
|
1437
|
+
# `gpt-image-2` and `gpt-image-2-2026-04-21` do not support transparent
|
|
1438
|
+
# backgrounds. Requests with `background` set to `transparent` will return an
|
|
1439
|
+
# error for these models; use `opaque` or `auto` instead.
|
|
1440
|
+
#
|
|
1441
|
+
# If `transparent`, the output format needs to support transparency, so it should
|
|
1442
|
+
# be set to either `png` (default value) or `webp`.
|
|
1443
|
+
module Background
|
|
1444
|
+
extend OpenAI::Internal::Type::Enum
|
|
1445
|
+
|
|
1446
|
+
TaggedSymbol =
|
|
1447
|
+
T.type_alias do
|
|
1448
|
+
T.all(
|
|
1449
|
+
Symbol,
|
|
1450
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background
|
|
1451
|
+
)
|
|
1452
|
+
end
|
|
1453
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1454
|
+
|
|
1455
|
+
TRANSPARENT =
|
|
1456
|
+
T.let(
|
|
1457
|
+
:transparent,
|
|
1458
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::TaggedSymbol
|
|
1459
|
+
)
|
|
1460
|
+
OPAQUE =
|
|
1461
|
+
T.let(
|
|
1462
|
+
:opaque,
|
|
1463
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::TaggedSymbol
|
|
1464
|
+
)
|
|
1465
|
+
AUTO =
|
|
1466
|
+
T.let(
|
|
1467
|
+
:auto,
|
|
1468
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::TaggedSymbol
|
|
1469
|
+
)
|
|
1470
|
+
|
|
1471
|
+
sig do
|
|
1472
|
+
override.returns(
|
|
1473
|
+
T::Array[
|
|
1474
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Background::TaggedSymbol
|
|
1475
|
+
]
|
|
1476
|
+
)
|
|
1477
|
+
end
|
|
1478
|
+
def self.values
|
|
1479
|
+
end
|
|
1480
|
+
end
|
|
1481
|
+
|
|
1482
|
+
# Control how much effort the model will exert to match the style and features,
|
|
1483
|
+
# especially facial features, of input images. This parameter is only supported
|
|
1484
|
+
# for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for
|
|
1485
|
+
# `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
|
|
1486
|
+
module InputFidelity
|
|
1487
|
+
extend OpenAI::Internal::Type::Enum
|
|
1488
|
+
|
|
1489
|
+
TaggedSymbol =
|
|
1490
|
+
T.type_alias do
|
|
1491
|
+
T.all(
|
|
1492
|
+
Symbol,
|
|
1493
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity
|
|
1494
|
+
)
|
|
1495
|
+
end
|
|
1496
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1497
|
+
|
|
1498
|
+
HIGH =
|
|
1499
|
+
T.let(
|
|
1500
|
+
:high,
|
|
1501
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::TaggedSymbol
|
|
1502
|
+
)
|
|
1503
|
+
LOW =
|
|
1504
|
+
T.let(
|
|
1505
|
+
:low,
|
|
1506
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::TaggedSymbol
|
|
1507
|
+
)
|
|
1508
|
+
|
|
1509
|
+
sig do
|
|
1510
|
+
override.returns(
|
|
1511
|
+
T::Array[
|
|
1512
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::TaggedSymbol
|
|
1513
|
+
]
|
|
1514
|
+
)
|
|
1515
|
+
end
|
|
1516
|
+
def self.values
|
|
1517
|
+
end
|
|
1518
|
+
end
|
|
1519
|
+
|
|
1520
|
+
class InputImageMask < OpenAI::Internal::Type::BaseModel
|
|
1521
|
+
OrHash =
|
|
1522
|
+
T.type_alias do
|
|
1523
|
+
T.any(
|
|
1524
|
+
OpenAI::Beta::BetaTool::ImageGeneration::InputImageMask,
|
|
1525
|
+
OpenAI::Internal::AnyHash
|
|
1526
|
+
)
|
|
1527
|
+
end
|
|
1528
|
+
|
|
1529
|
+
# File ID for the mask image.
|
|
1530
|
+
sig { returns(T.nilable(String)) }
|
|
1531
|
+
attr_reader :file_id
|
|
1532
|
+
|
|
1533
|
+
sig { params(file_id: String).void }
|
|
1534
|
+
attr_writer :file_id
|
|
1535
|
+
|
|
1536
|
+
# Base64-encoded mask image.
|
|
1537
|
+
sig { returns(T.nilable(String)) }
|
|
1538
|
+
attr_reader :image_url
|
|
1539
|
+
|
|
1540
|
+
sig { params(image_url: String).void }
|
|
1541
|
+
attr_writer :image_url
|
|
1542
|
+
|
|
1543
|
+
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
1544
|
+
# `file_id` (string, optional).
|
|
1545
|
+
sig do
|
|
1546
|
+
params(file_id: String, image_url: String).returns(
|
|
1547
|
+
T.attached_class
|
|
1548
|
+
)
|
|
1549
|
+
end
|
|
1550
|
+
def self.new(
|
|
1551
|
+
# File ID for the mask image.
|
|
1552
|
+
file_id: nil,
|
|
1553
|
+
# Base64-encoded mask image.
|
|
1554
|
+
image_url: nil
|
|
1555
|
+
)
|
|
1556
|
+
end
|
|
1557
|
+
|
|
1558
|
+
sig { override.returns({ file_id: String, image_url: String }) }
|
|
1559
|
+
def to_hash
|
|
1560
|
+
end
|
|
1561
|
+
end
|
|
1562
|
+
|
|
1563
|
+
# The image generation model to use. Default: `gpt-image-1`.
|
|
1564
|
+
module Model
|
|
1565
|
+
extend OpenAI::Internal::Type::Union
|
|
1566
|
+
|
|
1567
|
+
Variants =
|
|
1568
|
+
T.type_alias do
|
|
1569
|
+
T.any(
|
|
1570
|
+
String,
|
|
1571
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::TaggedSymbol
|
|
1572
|
+
)
|
|
1573
|
+
end
|
|
1574
|
+
|
|
1575
|
+
sig do
|
|
1576
|
+
override.returns(
|
|
1577
|
+
T::Array[
|
|
1578
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::Variants
|
|
1579
|
+
]
|
|
1580
|
+
)
|
|
1581
|
+
end
|
|
1582
|
+
def self.variants
|
|
1583
|
+
end
|
|
1584
|
+
|
|
1585
|
+
TaggedSymbol =
|
|
1586
|
+
T.type_alias do
|
|
1587
|
+
T.all(Symbol, OpenAI::Beta::BetaTool::ImageGeneration::Model)
|
|
1588
|
+
end
|
|
1589
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1590
|
+
|
|
1591
|
+
GPT_IMAGE_1 =
|
|
1592
|
+
T.let(
|
|
1593
|
+
:"gpt-image-1",
|
|
1594
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::TaggedSymbol
|
|
1595
|
+
)
|
|
1596
|
+
GPT_IMAGE_1_MINI =
|
|
1597
|
+
T.let(
|
|
1598
|
+
:"gpt-image-1-mini",
|
|
1599
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::TaggedSymbol
|
|
1600
|
+
)
|
|
1601
|
+
GPT_IMAGE_2 =
|
|
1602
|
+
T.let(
|
|
1603
|
+
:"gpt-image-2",
|
|
1604
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::TaggedSymbol
|
|
1605
|
+
)
|
|
1606
|
+
GPT_IMAGE_2_2026_04_21 =
|
|
1607
|
+
T.let(
|
|
1608
|
+
:"gpt-image-2-2026-04-21",
|
|
1609
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::TaggedSymbol
|
|
1610
|
+
)
|
|
1611
|
+
GPT_IMAGE_1_5 =
|
|
1612
|
+
T.let(
|
|
1613
|
+
:"gpt-image-1.5",
|
|
1614
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::TaggedSymbol
|
|
1615
|
+
)
|
|
1616
|
+
CHATGPT_IMAGE_LATEST =
|
|
1617
|
+
T.let(
|
|
1618
|
+
:"chatgpt-image-latest",
|
|
1619
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Model::TaggedSymbol
|
|
1620
|
+
)
|
|
1621
|
+
end
|
|
1622
|
+
|
|
1623
|
+
# Moderation level for the generated image. Default: `auto`.
|
|
1624
|
+
module Moderation
|
|
1625
|
+
extend OpenAI::Internal::Type::Enum
|
|
1626
|
+
|
|
1627
|
+
TaggedSymbol =
|
|
1628
|
+
T.type_alias do
|
|
1629
|
+
T.all(
|
|
1630
|
+
Symbol,
|
|
1631
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation
|
|
1632
|
+
)
|
|
1633
|
+
end
|
|
1634
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1635
|
+
|
|
1636
|
+
AUTO =
|
|
1637
|
+
T.let(
|
|
1638
|
+
:auto,
|
|
1639
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation::TaggedSymbol
|
|
1640
|
+
)
|
|
1641
|
+
LOW =
|
|
1642
|
+
T.let(
|
|
1643
|
+
:low,
|
|
1644
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation::TaggedSymbol
|
|
1645
|
+
)
|
|
1646
|
+
|
|
1647
|
+
sig do
|
|
1648
|
+
override.returns(
|
|
1649
|
+
T::Array[
|
|
1650
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Moderation::TaggedSymbol
|
|
1651
|
+
]
|
|
1652
|
+
)
|
|
1653
|
+
end
|
|
1654
|
+
def self.values
|
|
1655
|
+
end
|
|
1656
|
+
end
|
|
1657
|
+
|
|
1658
|
+
# The output format of the generated image. One of `png`, `webp`, or `jpeg`.
|
|
1659
|
+
# Default: `png`.
|
|
1660
|
+
module OutputFormat
|
|
1661
|
+
extend OpenAI::Internal::Type::Enum
|
|
1662
|
+
|
|
1663
|
+
TaggedSymbol =
|
|
1664
|
+
T.type_alias do
|
|
1665
|
+
T.all(
|
|
1666
|
+
Symbol,
|
|
1667
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat
|
|
1668
|
+
)
|
|
1669
|
+
end
|
|
1670
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1671
|
+
|
|
1672
|
+
PNG =
|
|
1673
|
+
T.let(
|
|
1674
|
+
:png,
|
|
1675
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::TaggedSymbol
|
|
1676
|
+
)
|
|
1677
|
+
WEBP =
|
|
1678
|
+
T.let(
|
|
1679
|
+
:webp,
|
|
1680
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::TaggedSymbol
|
|
1681
|
+
)
|
|
1682
|
+
JPEG =
|
|
1683
|
+
T.let(
|
|
1684
|
+
:jpeg,
|
|
1685
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::TaggedSymbol
|
|
1686
|
+
)
|
|
1687
|
+
|
|
1688
|
+
sig do
|
|
1689
|
+
override.returns(
|
|
1690
|
+
T::Array[
|
|
1691
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat::TaggedSymbol
|
|
1692
|
+
]
|
|
1693
|
+
)
|
|
1694
|
+
end
|
|
1695
|
+
def self.values
|
|
1696
|
+
end
|
|
1697
|
+
end
|
|
1698
|
+
|
|
1699
|
+
# The quality of the generated image. One of `low`, `medium`, `high`, or `auto`.
|
|
1700
|
+
# Default: `auto`.
|
|
1701
|
+
module Quality
|
|
1702
|
+
extend OpenAI::Internal::Type::Enum
|
|
1703
|
+
|
|
1704
|
+
TaggedSymbol =
|
|
1705
|
+
T.type_alias do
|
|
1706
|
+
T.all(Symbol, OpenAI::Beta::BetaTool::ImageGeneration::Quality)
|
|
1707
|
+
end
|
|
1708
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1709
|
+
|
|
1710
|
+
LOW =
|
|
1711
|
+
T.let(
|
|
1712
|
+
:low,
|
|
1713
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::TaggedSymbol
|
|
1714
|
+
)
|
|
1715
|
+
MEDIUM =
|
|
1716
|
+
T.let(
|
|
1717
|
+
:medium,
|
|
1718
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::TaggedSymbol
|
|
1719
|
+
)
|
|
1720
|
+
HIGH =
|
|
1721
|
+
T.let(
|
|
1722
|
+
:high,
|
|
1723
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::TaggedSymbol
|
|
1724
|
+
)
|
|
1725
|
+
AUTO =
|
|
1726
|
+
T.let(
|
|
1727
|
+
:auto,
|
|
1728
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::TaggedSymbol
|
|
1729
|
+
)
|
|
1730
|
+
|
|
1731
|
+
sig do
|
|
1732
|
+
override.returns(
|
|
1733
|
+
T::Array[
|
|
1734
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Quality::TaggedSymbol
|
|
1735
|
+
]
|
|
1736
|
+
)
|
|
1737
|
+
end
|
|
1738
|
+
def self.values
|
|
1739
|
+
end
|
|
1740
|
+
end
|
|
1741
|
+
|
|
1742
|
+
# The size of the generated images. For `gpt-image-2` and
|
|
1743
|
+
# `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT`
|
|
1744
|
+
# strings, for example `1536x864`. Width and height must both be divisible by 16
|
|
1745
|
+
# and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above
|
|
1746
|
+
# `2560x1440` are experimental, and the maximum supported resolution is
|
|
1747
|
+
# `3840x2160`. The requested size must also satisfy the model's current pixel and
|
|
1748
|
+
# edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are
|
|
1749
|
+
# supported by the GPT image models; `auto` is supported for models that allow
|
|
1750
|
+
# automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or
|
|
1751
|
+
# `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or
|
|
1752
|
+
# `1024x1792`.
|
|
1753
|
+
module Size
|
|
1754
|
+
extend OpenAI::Internal::Type::Union
|
|
1755
|
+
|
|
1756
|
+
Variants =
|
|
1757
|
+
T.type_alias do
|
|
1758
|
+
T.any(
|
|
1759
|
+
String,
|
|
1760
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::TaggedSymbol
|
|
1761
|
+
)
|
|
1762
|
+
end
|
|
1763
|
+
|
|
1764
|
+
sig do
|
|
1765
|
+
override.returns(
|
|
1766
|
+
T::Array[
|
|
1767
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::Variants
|
|
1768
|
+
]
|
|
1769
|
+
)
|
|
1770
|
+
end
|
|
1771
|
+
def self.variants
|
|
1772
|
+
end
|
|
1773
|
+
|
|
1774
|
+
TaggedSymbol =
|
|
1775
|
+
T.type_alias do
|
|
1776
|
+
T.all(Symbol, OpenAI::Beta::BetaTool::ImageGeneration::Size)
|
|
1777
|
+
end
|
|
1778
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1779
|
+
|
|
1780
|
+
SIZE_1024X1024 =
|
|
1781
|
+
T.let(
|
|
1782
|
+
:"1024x1024",
|
|
1783
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::TaggedSymbol
|
|
1784
|
+
)
|
|
1785
|
+
SIZE_1024X1536 =
|
|
1786
|
+
T.let(
|
|
1787
|
+
:"1024x1536",
|
|
1788
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::TaggedSymbol
|
|
1789
|
+
)
|
|
1790
|
+
SIZE_1536X1024 =
|
|
1791
|
+
T.let(
|
|
1792
|
+
:"1536x1024",
|
|
1793
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::TaggedSymbol
|
|
1794
|
+
)
|
|
1795
|
+
AUTO =
|
|
1796
|
+
T.let(
|
|
1797
|
+
:auto,
|
|
1798
|
+
OpenAI::Beta::BetaTool::ImageGeneration::Size::TaggedSymbol
|
|
1799
|
+
)
|
|
1800
|
+
end
|
|
1801
|
+
end
|
|
1802
|
+
|
|
1803
|
+
class LocalShell < OpenAI::Internal::Type::BaseModel
|
|
1804
|
+
OrHash =
|
|
1805
|
+
T.type_alias do
|
|
1806
|
+
T.any(
|
|
1807
|
+
OpenAI::Beta::BetaTool::LocalShell,
|
|
1808
|
+
OpenAI::Internal::AnyHash
|
|
1809
|
+
)
|
|
1810
|
+
end
|
|
1811
|
+
|
|
1812
|
+
# The type of the local shell tool. Always `local_shell`.
|
|
1813
|
+
sig { returns(Symbol) }
|
|
1814
|
+
attr_accessor :type
|
|
1815
|
+
|
|
1816
|
+
# A tool that allows the model to execute shell commands in a local environment.
|
|
1817
|
+
sig { params(type: Symbol).returns(T.attached_class) }
|
|
1818
|
+
def self.new(
|
|
1819
|
+
# The type of the local shell tool. Always `local_shell`.
|
|
1820
|
+
type: :local_shell
|
|
1821
|
+
)
|
|
1822
|
+
end
|
|
1823
|
+
|
|
1824
|
+
sig { override.returns({ type: Symbol }) }
|
|
1825
|
+
def to_hash
|
|
1826
|
+
end
|
|
1827
|
+
end
|
|
1828
|
+
|
|
1829
|
+
sig { override.returns(T::Array[OpenAI::Beta::BetaTool::Variants]) }
|
|
1830
|
+
def self.variants
|
|
1831
|
+
end
|
|
1832
|
+
end
|
|
1833
|
+
end
|
|
1834
|
+
end
|
|
1835
|
+
end
|