openai 0.67.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 +31 -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 +39 -8
- data/lib/openai/models/realtime/realtime_session_create_request.rb +6 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +45 -8
- data/lib/openai/models/realtime/realtime_tools_config_union.rb +39 -8
- 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 +74 -10
- data/lib/openai/models/video_create_params.rb +1 -0
- data/lib/openai/models/video_edit_params.rb +2 -2
- 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 +84 -11
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +10 -0
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +94 -11
- data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +84 -11
- 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 +166 -12
- data/rbi/openai/models/video_edit_params.rbi +1 -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 +25 -2
- data/sig/openai/models/realtime/realtime_session_create_request.rbs +4 -0
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +29 -2
- data/sig/openai/models/realtime/realtime_tools_config_union.rbs +25 -2
- 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 +54 -4
- 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,903 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Resources
|
|
5
|
+
class Beta
|
|
6
|
+
class Responses
|
|
7
|
+
sig { returns(OpenAI::Resources::Beta::Responses::InputItems) }
|
|
8
|
+
attr_reader :input_items
|
|
9
|
+
|
|
10
|
+
sig { returns(OpenAI::Resources::Beta::Responses::InputTokens) }
|
|
11
|
+
attr_reader :input_tokens
|
|
12
|
+
|
|
13
|
+
# See {OpenAI::Resources::Beta::Responses#stream_raw} for streaming counterpart.
|
|
14
|
+
#
|
|
15
|
+
# Creates a model response. Provide
|
|
16
|
+
# [text](https://platform.openai.com/docs/guides/text) or
|
|
17
|
+
# [image](https://platform.openai.com/docs/guides/images) inputs to generate
|
|
18
|
+
# [text](https://platform.openai.com/docs/guides/text) or
|
|
19
|
+
# [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have
|
|
20
|
+
# the model call your own
|
|
21
|
+
# [custom code](https://platform.openai.com/docs/guides/function-calling) or use
|
|
22
|
+
# built-in [tools](https://platform.openai.com/docs/guides/tools) like
|
|
23
|
+
# [web search](https://platform.openai.com/docs/guides/tools-web-search) or
|
|
24
|
+
# [file search](https://platform.openai.com/docs/guides/tools-file-search) to use
|
|
25
|
+
# your own data as input for the model's response.
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
background: T.nilable(T::Boolean),
|
|
29
|
+
context_management:
|
|
30
|
+
T.nilable(
|
|
31
|
+
T::Array[
|
|
32
|
+
OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash
|
|
33
|
+
]
|
|
34
|
+
),
|
|
35
|
+
conversation:
|
|
36
|
+
T.nilable(
|
|
37
|
+
T.any(
|
|
38
|
+
String,
|
|
39
|
+
OpenAI::Beta::BetaResponseConversationParam::OrHash
|
|
40
|
+
)
|
|
41
|
+
),
|
|
42
|
+
include:
|
|
43
|
+
T.nilable(
|
|
44
|
+
T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]
|
|
45
|
+
),
|
|
46
|
+
input: OpenAI::Beta::ResponseCreateParams::Input::Variants,
|
|
47
|
+
instructions: T.nilable(String),
|
|
48
|
+
max_output_tokens: T.nilable(Integer),
|
|
49
|
+
max_tool_calls: T.nilable(Integer),
|
|
50
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
51
|
+
model:
|
|
52
|
+
T.any(
|
|
53
|
+
OpenAI::Beta::ResponseCreateParams::Model::OrSymbol,
|
|
54
|
+
String
|
|
55
|
+
),
|
|
56
|
+
moderation:
|
|
57
|
+
T.nilable(OpenAI::Beta::ResponseCreateParams::Moderation::OrHash),
|
|
58
|
+
multi_agent:
|
|
59
|
+
T.nilable(OpenAI::Beta::ResponseCreateParams::MultiAgent::OrHash),
|
|
60
|
+
parallel_tool_calls: T.nilable(T::Boolean),
|
|
61
|
+
previous_response_id: T.nilable(String),
|
|
62
|
+
prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash),
|
|
63
|
+
prompt_cache_key: String,
|
|
64
|
+
prompt_cache_options:
|
|
65
|
+
OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::OrHash,
|
|
66
|
+
prompt_cache_retention:
|
|
67
|
+
T.nilable(
|
|
68
|
+
OpenAI::Beta::ResponseCreateParams::PromptCacheRetention::OrSymbol
|
|
69
|
+
),
|
|
70
|
+
reasoning:
|
|
71
|
+
T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::OrHash),
|
|
72
|
+
safety_identifier: String,
|
|
73
|
+
service_tier:
|
|
74
|
+
T.nilable(
|
|
75
|
+
OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol
|
|
76
|
+
),
|
|
77
|
+
store: T.nilable(T::Boolean),
|
|
78
|
+
stream_options:
|
|
79
|
+
T.nilable(
|
|
80
|
+
OpenAI::Beta::ResponseCreateParams::StreamOptions::OrHash
|
|
81
|
+
),
|
|
82
|
+
temperature: T.nilable(Float),
|
|
83
|
+
text: OpenAI::Beta::BetaResponseTextConfig::OrHash,
|
|
84
|
+
tool_choice:
|
|
85
|
+
T.any(
|
|
86
|
+
OpenAI::Beta::BetaToolChoiceOptions::OrSymbol,
|
|
87
|
+
OpenAI::Beta::BetaToolChoiceAllowed::OrHash,
|
|
88
|
+
OpenAI::Beta::BetaToolChoiceTypes::OrHash,
|
|
89
|
+
OpenAI::Beta::BetaToolChoiceFunction::OrHash,
|
|
90
|
+
OpenAI::Beta::BetaToolChoiceMcp::OrHash,
|
|
91
|
+
OpenAI::Beta::BetaToolChoiceCustom::OrHash,
|
|
92
|
+
OpenAI::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam::OrHash,
|
|
93
|
+
OpenAI::Beta::BetaToolChoiceApplyPatch::OrHash,
|
|
94
|
+
OpenAI::Beta::BetaToolChoiceShell::OrHash
|
|
95
|
+
),
|
|
96
|
+
tools:
|
|
97
|
+
T::Array[
|
|
98
|
+
T.any(
|
|
99
|
+
OpenAI::Beta::BetaFunctionTool::OrHash,
|
|
100
|
+
OpenAI::Beta::BetaFileSearchTool::OrHash,
|
|
101
|
+
OpenAI::Beta::BetaComputerTool::OrHash,
|
|
102
|
+
OpenAI::Beta::BetaComputerUsePreviewTool::OrHash,
|
|
103
|
+
OpenAI::Beta::BetaTool::Mcp::OrHash,
|
|
104
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::OrHash,
|
|
105
|
+
OpenAI::Beta::BetaTool::ProgrammaticToolCalling::OrHash,
|
|
106
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OrHash,
|
|
107
|
+
OpenAI::Beta::BetaTool::LocalShell::OrHash,
|
|
108
|
+
OpenAI::Beta::BetaFunctionShellTool::OrHash,
|
|
109
|
+
OpenAI::Beta::BetaCustomTool::OrHash,
|
|
110
|
+
OpenAI::Beta::BetaNamespaceTool::OrHash,
|
|
111
|
+
OpenAI::Beta::BetaToolSearchTool::OrHash,
|
|
112
|
+
OpenAI::Beta::BetaApplyPatchTool::OrHash,
|
|
113
|
+
OpenAI::Beta::BetaWebSearchTool::OrHash,
|
|
114
|
+
OpenAI::Beta::BetaWebSearchPreviewTool::OrHash
|
|
115
|
+
)
|
|
116
|
+
],
|
|
117
|
+
top_logprobs: T.nilable(Integer),
|
|
118
|
+
top_p: T.nilable(Float),
|
|
119
|
+
truncation:
|
|
120
|
+
T.nilable(
|
|
121
|
+
OpenAI::Beta::ResponseCreateParams::Truncation::OrSymbol
|
|
122
|
+
),
|
|
123
|
+
user: String,
|
|
124
|
+
betas: T::Array[OpenAI::Beta::ResponseCreateParams::Beta::OrSymbol],
|
|
125
|
+
stream: T.noreturn,
|
|
126
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
127
|
+
).returns(OpenAI::Beta::BetaResponse)
|
|
128
|
+
end
|
|
129
|
+
def create(
|
|
130
|
+
# Body param: Whether to run the model response in the background.
|
|
131
|
+
# [Learn more](https://platform.openai.com/docs/guides/background).
|
|
132
|
+
background: nil,
|
|
133
|
+
# Body param: Context management configuration for this request.
|
|
134
|
+
context_management: nil,
|
|
135
|
+
# Body param: The conversation that this response belongs to. Items from this
|
|
136
|
+
# conversation are prepended to `input_items` for this response request. Input
|
|
137
|
+
# items and output items from this response are automatically added to this
|
|
138
|
+
# conversation after this response completes.
|
|
139
|
+
conversation: nil,
|
|
140
|
+
# Body param: Specify additional output data to include in the model response.
|
|
141
|
+
# Currently supported values are:
|
|
142
|
+
#
|
|
143
|
+
# - `web_search_call.action.sources`: Include the sources of the web search tool
|
|
144
|
+
# call.
|
|
145
|
+
# - `code_interpreter_call.outputs`: Includes the outputs of python code execution
|
|
146
|
+
# in code interpreter tool call items.
|
|
147
|
+
# - `computer_call_output.output.image_url`: Include image urls from the computer
|
|
148
|
+
# call output.
|
|
149
|
+
# - `file_search_call.results`: Include the search results of the file search tool
|
|
150
|
+
# call.
|
|
151
|
+
# - `message.input_image.image_url`: Include image urls from the input message.
|
|
152
|
+
# - `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
153
|
+
# - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
|
|
154
|
+
# tokens in reasoning item outputs. This enables reasoning items to be used in
|
|
155
|
+
# multi-turn conversations when using the Responses API statelessly (like when
|
|
156
|
+
# the `store` parameter is set to `false`, or when an organization is enrolled
|
|
157
|
+
# in the zero data retention program).
|
|
158
|
+
include: nil,
|
|
159
|
+
# Body param: Text, image, or file inputs to the model, used to generate a
|
|
160
|
+
# response.
|
|
161
|
+
#
|
|
162
|
+
# Learn more:
|
|
163
|
+
#
|
|
164
|
+
# - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
165
|
+
# - [Image inputs](https://platform.openai.com/docs/guides/images)
|
|
166
|
+
# - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
|
|
167
|
+
# - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
|
|
168
|
+
# - [Function calling](https://platform.openai.com/docs/guides/function-calling)
|
|
169
|
+
input: nil,
|
|
170
|
+
# Body param: A system (or developer) message inserted into the model's context.
|
|
171
|
+
#
|
|
172
|
+
# When using along with `previous_response_id`, the instructions from a previous
|
|
173
|
+
# response will not be carried over to the next response. This makes it simple to
|
|
174
|
+
# swap out system (or developer) messages in new responses.
|
|
175
|
+
instructions: nil,
|
|
176
|
+
# Body param: An upper bound for the number of tokens that can be generated for a
|
|
177
|
+
# response, including visible output tokens and
|
|
178
|
+
# [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
179
|
+
max_output_tokens: nil,
|
|
180
|
+
# Body param: The maximum number of total calls to built-in tools that can be
|
|
181
|
+
# processed in a response. This maximum number applies across all built-in tool
|
|
182
|
+
# calls, not per individual tool. Any further attempts to call a tool by the model
|
|
183
|
+
# will be ignored.
|
|
184
|
+
max_tool_calls: nil,
|
|
185
|
+
# Body param: Set of 16 key-value pairs that can be attached to an object. This
|
|
186
|
+
# can be useful for storing additional information about the object in a
|
|
187
|
+
# structured format, and querying for objects via API or the dashboard.
|
|
188
|
+
#
|
|
189
|
+
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
190
|
+
# a maximum length of 512 characters.
|
|
191
|
+
metadata: nil,
|
|
192
|
+
# Body param: Model ID used to generate the response, like `gpt-4o` or `o3`.
|
|
193
|
+
# OpenAI offers a wide range of models with different capabilities, performance
|
|
194
|
+
# characteristics, and price points. Refer to the
|
|
195
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
196
|
+
# available models.
|
|
197
|
+
model: nil,
|
|
198
|
+
# Body param: Configuration for running moderation on the input and output of this
|
|
199
|
+
# response.
|
|
200
|
+
moderation: nil,
|
|
201
|
+
# Body param: Configuration for server-hosted multi-agent execution.
|
|
202
|
+
multi_agent: nil,
|
|
203
|
+
# Body param: Whether to allow the model to run tool calls in parallel.
|
|
204
|
+
parallel_tool_calls: nil,
|
|
205
|
+
# Body param: The unique ID of the previous response to the model. Use this to
|
|
206
|
+
# create multi-turn conversations. Learn more about
|
|
207
|
+
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
208
|
+
# Cannot be used in conjunction with `conversation`.
|
|
209
|
+
previous_response_id: nil,
|
|
210
|
+
# Body param: Reference to a prompt template and its variables.
|
|
211
|
+
# [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
212
|
+
prompt: nil,
|
|
213
|
+
# Body param: Used by OpenAI to cache responses for similar requests to optimize
|
|
214
|
+
# your cache hit rates. Replaces the `user` field.
|
|
215
|
+
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
216
|
+
prompt_cache_key: nil,
|
|
217
|
+
# Body param: Options for prompt caching. Supported for `gpt-5.6` and later
|
|
218
|
+
# models. By default, OpenAI automatically chooses one implicit cache breakpoint.
|
|
219
|
+
# You can add explicit breakpoints to content blocks with
|
|
220
|
+
# `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For
|
|
221
|
+
# cache matching, OpenAI considers up to the latest 80 breakpoints in the
|
|
222
|
+
# conversation, without a content-block lookback limit. Set `mode` to `explicit`
|
|
223
|
+
# to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
|
|
224
|
+
# currently the only supported value. See the
|
|
225
|
+
# [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
226
|
+
# for current details.
|
|
227
|
+
prompt_cache_options: nil,
|
|
228
|
+
# Body param: Deprecated. Use `prompt_cache_options.ttl` instead.
|
|
229
|
+
#
|
|
230
|
+
# The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
231
|
+
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
232
|
+
# of 24 hours.
|
|
233
|
+
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
234
|
+
# This field expresses a maximum retention policy, while
|
|
235
|
+
# `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
236
|
+
# are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
237
|
+
# models, only `24h` is supported.
|
|
238
|
+
#
|
|
239
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
240
|
+
# your organization's data retention policy:
|
|
241
|
+
#
|
|
242
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
243
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
244
|
+
# `prompt_cache_retention` is not specified.
|
|
245
|
+
prompt_cache_retention: nil,
|
|
246
|
+
# Body param: **gpt-5 and o-series models only**
|
|
247
|
+
#
|
|
248
|
+
# Configuration options for
|
|
249
|
+
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
250
|
+
reasoning: nil,
|
|
251
|
+
# Body param: A stable identifier used to help detect users of your application
|
|
252
|
+
# that may be violating OpenAI's usage policies. The IDs should be a string that
|
|
253
|
+
# uniquely identifies each user, with a maximum length of 64 characters. We
|
|
254
|
+
# recommend hashing their username or email address, in order to avoid sending us
|
|
255
|
+
# any identifying information.
|
|
256
|
+
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
257
|
+
safety_identifier: nil,
|
|
258
|
+
# Body param: Specifies the processing type used for serving the request.
|
|
259
|
+
#
|
|
260
|
+
# - If set to 'auto', then the request will be processed with the service tier
|
|
261
|
+
# configured in the Project settings. Unless otherwise configured, the Project
|
|
262
|
+
# will use 'default'.
|
|
263
|
+
# - If set to 'default', then the request will be processed with the standard
|
|
264
|
+
# pricing and performance for the selected model.
|
|
265
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
|
266
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
|
267
|
+
# will be processed with the corresponding service tier.
|
|
268
|
+
# - When not set, the default behavior is 'auto'.
|
|
269
|
+
#
|
|
270
|
+
# When the `service_tier` parameter is set, the response body will include the
|
|
271
|
+
# `service_tier` value based on the processing mode actually used to serve the
|
|
272
|
+
# request. This response value may be different from the value set in the
|
|
273
|
+
# parameter.
|
|
274
|
+
service_tier: nil,
|
|
275
|
+
# Body param: Whether to store the generated model response for later retrieval
|
|
276
|
+
# via API.
|
|
277
|
+
store: nil,
|
|
278
|
+
# Body param: Options for streaming responses. Only set this when you set
|
|
279
|
+
# `stream: true`.
|
|
280
|
+
stream_options: nil,
|
|
281
|
+
# Body param: What sampling temperature to use, between 0 and 2. Higher values
|
|
282
|
+
# like 0.8 will make the output more random, while lower values like 0.2 will make
|
|
283
|
+
# it more focused and deterministic. We generally recommend altering this or
|
|
284
|
+
# `top_p` but not both.
|
|
285
|
+
temperature: nil,
|
|
286
|
+
# Body param: Configuration options for a text response from the model. Can be
|
|
287
|
+
# plain text or structured JSON data. Learn more:
|
|
288
|
+
#
|
|
289
|
+
# - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
290
|
+
# - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
291
|
+
text: nil,
|
|
292
|
+
# Body param: How the model should select which tool (or tools) to use when
|
|
293
|
+
# generating a response. See the `tools` parameter to see how to specify which
|
|
294
|
+
# tools the model can call.
|
|
295
|
+
tool_choice: nil,
|
|
296
|
+
# Body param: An array of tools the model may call while generating a response.
|
|
297
|
+
# You can specify which tool to use by setting the `tool_choice` parameter.
|
|
298
|
+
#
|
|
299
|
+
# We support the following categories of tools:
|
|
300
|
+
#
|
|
301
|
+
# - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
302
|
+
# capabilities, like
|
|
303
|
+
# [web search](https://platform.openai.com/docs/guides/tools-web-search) or
|
|
304
|
+
# [file search](https://platform.openai.com/docs/guides/tools-file-search).
|
|
305
|
+
# Learn more about
|
|
306
|
+
# [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
307
|
+
# - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
308
|
+
# predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
309
|
+
# [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
310
|
+
# - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
311
|
+
# the model to call your own code with strongly typed arguments and outputs.
|
|
312
|
+
# Learn more about
|
|
313
|
+
# [function calling](https://platform.openai.com/docs/guides/function-calling).
|
|
314
|
+
# You can also use custom tools to call your own code.
|
|
315
|
+
tools: nil,
|
|
316
|
+
# Body param: An integer between 0 and 20 specifying the maximum number of most
|
|
317
|
+
# likely tokens to return at each token position, each with an associated log
|
|
318
|
+
# probability. In some cases, the number of returned tokens may be fewer than
|
|
319
|
+
# requested.
|
|
320
|
+
top_logprobs: nil,
|
|
321
|
+
# Body param: An alternative to sampling with temperature, called nucleus
|
|
322
|
+
# sampling, where the model considers the results of the tokens with top_p
|
|
323
|
+
# probability mass. So 0.1 means only the tokens comprising the top 10%
|
|
324
|
+
# probability mass are considered.
|
|
325
|
+
#
|
|
326
|
+
# We generally recommend altering this or `temperature` but not both.
|
|
327
|
+
top_p: nil,
|
|
328
|
+
# Body param: The truncation strategy to use for the model response.
|
|
329
|
+
#
|
|
330
|
+
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
331
|
+
# the model will truncate the response to fit the context window by dropping
|
|
332
|
+
# items from the beginning of the conversation.
|
|
333
|
+
# - `disabled` (default): If the input size will exceed the context window size
|
|
334
|
+
# for a model, the request will fail with a 400 error.
|
|
335
|
+
truncation: nil,
|
|
336
|
+
# Body param: This field is being replaced by `safety_identifier` and
|
|
337
|
+
# `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
|
|
338
|
+
# optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
339
|
+
# rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
340
|
+
# abuse.
|
|
341
|
+
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
342
|
+
user: nil,
|
|
343
|
+
# Header param: Optional beta features to enable for this request.
|
|
344
|
+
betas: nil,
|
|
345
|
+
# There is no need to provide `stream:`. Instead, use `#stream_raw` or `#create`
|
|
346
|
+
# for streaming and non-streaming use cases, respectively.
|
|
347
|
+
stream: false,
|
|
348
|
+
request_options: {}
|
|
349
|
+
)
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# See {OpenAI::Resources::Beta::Responses#create} for non-streaming counterpart.
|
|
353
|
+
#
|
|
354
|
+
# Creates a model response. Provide
|
|
355
|
+
# [text](https://platform.openai.com/docs/guides/text) or
|
|
356
|
+
# [image](https://platform.openai.com/docs/guides/images) inputs to generate
|
|
357
|
+
# [text](https://platform.openai.com/docs/guides/text) or
|
|
358
|
+
# [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have
|
|
359
|
+
# the model call your own
|
|
360
|
+
# [custom code](https://platform.openai.com/docs/guides/function-calling) or use
|
|
361
|
+
# built-in [tools](https://platform.openai.com/docs/guides/tools) like
|
|
362
|
+
# [web search](https://platform.openai.com/docs/guides/tools-web-search) or
|
|
363
|
+
# [file search](https://platform.openai.com/docs/guides/tools-file-search) to use
|
|
364
|
+
# your own data as input for the model's response.
|
|
365
|
+
sig do
|
|
366
|
+
params(
|
|
367
|
+
background: T.nilable(T::Boolean),
|
|
368
|
+
context_management:
|
|
369
|
+
T.nilable(
|
|
370
|
+
T::Array[
|
|
371
|
+
OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash
|
|
372
|
+
]
|
|
373
|
+
),
|
|
374
|
+
conversation:
|
|
375
|
+
T.nilable(
|
|
376
|
+
T.any(
|
|
377
|
+
String,
|
|
378
|
+
OpenAI::Beta::BetaResponseConversationParam::OrHash
|
|
379
|
+
)
|
|
380
|
+
),
|
|
381
|
+
include:
|
|
382
|
+
T.nilable(
|
|
383
|
+
T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]
|
|
384
|
+
),
|
|
385
|
+
input: OpenAI::Beta::ResponseCreateParams::Input::Variants,
|
|
386
|
+
instructions: T.nilable(String),
|
|
387
|
+
max_output_tokens: T.nilable(Integer),
|
|
388
|
+
max_tool_calls: T.nilable(Integer),
|
|
389
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
390
|
+
model:
|
|
391
|
+
T.any(
|
|
392
|
+
OpenAI::Beta::ResponseCreateParams::Model::OrSymbol,
|
|
393
|
+
String
|
|
394
|
+
),
|
|
395
|
+
moderation:
|
|
396
|
+
T.nilable(OpenAI::Beta::ResponseCreateParams::Moderation::OrHash),
|
|
397
|
+
multi_agent:
|
|
398
|
+
T.nilable(OpenAI::Beta::ResponseCreateParams::MultiAgent::OrHash),
|
|
399
|
+
parallel_tool_calls: T.nilable(T::Boolean),
|
|
400
|
+
previous_response_id: T.nilable(String),
|
|
401
|
+
prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash),
|
|
402
|
+
prompt_cache_key: String,
|
|
403
|
+
prompt_cache_options:
|
|
404
|
+
OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::OrHash,
|
|
405
|
+
prompt_cache_retention:
|
|
406
|
+
T.nilable(
|
|
407
|
+
OpenAI::Beta::ResponseCreateParams::PromptCacheRetention::OrSymbol
|
|
408
|
+
),
|
|
409
|
+
reasoning:
|
|
410
|
+
T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::OrHash),
|
|
411
|
+
safety_identifier: String,
|
|
412
|
+
service_tier:
|
|
413
|
+
T.nilable(
|
|
414
|
+
OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol
|
|
415
|
+
),
|
|
416
|
+
store: T.nilable(T::Boolean),
|
|
417
|
+
stream_options:
|
|
418
|
+
T.nilable(
|
|
419
|
+
OpenAI::Beta::ResponseCreateParams::StreamOptions::OrHash
|
|
420
|
+
),
|
|
421
|
+
temperature: T.nilable(Float),
|
|
422
|
+
text: OpenAI::Beta::BetaResponseTextConfig::OrHash,
|
|
423
|
+
tool_choice:
|
|
424
|
+
T.any(
|
|
425
|
+
OpenAI::Beta::BetaToolChoiceOptions::OrSymbol,
|
|
426
|
+
OpenAI::Beta::BetaToolChoiceAllowed::OrHash,
|
|
427
|
+
OpenAI::Beta::BetaToolChoiceTypes::OrHash,
|
|
428
|
+
OpenAI::Beta::BetaToolChoiceFunction::OrHash,
|
|
429
|
+
OpenAI::Beta::BetaToolChoiceMcp::OrHash,
|
|
430
|
+
OpenAI::Beta::BetaToolChoiceCustom::OrHash,
|
|
431
|
+
OpenAI::Beta::ResponseCreateParams::ToolChoice::BetaSpecificProgrammaticToolCallingParam::OrHash,
|
|
432
|
+
OpenAI::Beta::BetaToolChoiceApplyPatch::OrHash,
|
|
433
|
+
OpenAI::Beta::BetaToolChoiceShell::OrHash
|
|
434
|
+
),
|
|
435
|
+
tools:
|
|
436
|
+
T::Array[
|
|
437
|
+
T.any(
|
|
438
|
+
OpenAI::Beta::BetaFunctionTool::OrHash,
|
|
439
|
+
OpenAI::Beta::BetaFileSearchTool::OrHash,
|
|
440
|
+
OpenAI::Beta::BetaComputerTool::OrHash,
|
|
441
|
+
OpenAI::Beta::BetaComputerUsePreviewTool::OrHash,
|
|
442
|
+
OpenAI::Beta::BetaTool::Mcp::OrHash,
|
|
443
|
+
OpenAI::Beta::BetaTool::CodeInterpreter::OrHash,
|
|
444
|
+
OpenAI::Beta::BetaTool::ProgrammaticToolCalling::OrHash,
|
|
445
|
+
OpenAI::Beta::BetaTool::ImageGeneration::OrHash,
|
|
446
|
+
OpenAI::Beta::BetaTool::LocalShell::OrHash,
|
|
447
|
+
OpenAI::Beta::BetaFunctionShellTool::OrHash,
|
|
448
|
+
OpenAI::Beta::BetaCustomTool::OrHash,
|
|
449
|
+
OpenAI::Beta::BetaNamespaceTool::OrHash,
|
|
450
|
+
OpenAI::Beta::BetaToolSearchTool::OrHash,
|
|
451
|
+
OpenAI::Beta::BetaApplyPatchTool::OrHash,
|
|
452
|
+
OpenAI::Beta::BetaWebSearchTool::OrHash,
|
|
453
|
+
OpenAI::Beta::BetaWebSearchPreviewTool::OrHash
|
|
454
|
+
)
|
|
455
|
+
],
|
|
456
|
+
top_logprobs: T.nilable(Integer),
|
|
457
|
+
top_p: T.nilable(Float),
|
|
458
|
+
truncation:
|
|
459
|
+
T.nilable(
|
|
460
|
+
OpenAI::Beta::ResponseCreateParams::Truncation::OrSymbol
|
|
461
|
+
),
|
|
462
|
+
user: String,
|
|
463
|
+
betas: T::Array[OpenAI::Beta::ResponseCreateParams::Beta::OrSymbol],
|
|
464
|
+
stream: T.noreturn,
|
|
465
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
466
|
+
).returns(
|
|
467
|
+
OpenAI::Internal::Stream[
|
|
468
|
+
OpenAI::Beta::BetaResponseStreamEvent::Variants
|
|
469
|
+
]
|
|
470
|
+
)
|
|
471
|
+
end
|
|
472
|
+
def stream_raw(
|
|
473
|
+
# Body param: Whether to run the model response in the background.
|
|
474
|
+
# [Learn more](https://platform.openai.com/docs/guides/background).
|
|
475
|
+
background: nil,
|
|
476
|
+
# Body param: Context management configuration for this request.
|
|
477
|
+
context_management: nil,
|
|
478
|
+
# Body param: The conversation that this response belongs to. Items from this
|
|
479
|
+
# conversation are prepended to `input_items` for this response request. Input
|
|
480
|
+
# items and output items from this response are automatically added to this
|
|
481
|
+
# conversation after this response completes.
|
|
482
|
+
conversation: nil,
|
|
483
|
+
# Body param: Specify additional output data to include in the model response.
|
|
484
|
+
# Currently supported values are:
|
|
485
|
+
#
|
|
486
|
+
# - `web_search_call.action.sources`: Include the sources of the web search tool
|
|
487
|
+
# call.
|
|
488
|
+
# - `code_interpreter_call.outputs`: Includes the outputs of python code execution
|
|
489
|
+
# in code interpreter tool call items.
|
|
490
|
+
# - `computer_call_output.output.image_url`: Include image urls from the computer
|
|
491
|
+
# call output.
|
|
492
|
+
# - `file_search_call.results`: Include the search results of the file search tool
|
|
493
|
+
# call.
|
|
494
|
+
# - `message.input_image.image_url`: Include image urls from the input message.
|
|
495
|
+
# - `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
496
|
+
# - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
|
|
497
|
+
# tokens in reasoning item outputs. This enables reasoning items to be used in
|
|
498
|
+
# multi-turn conversations when using the Responses API statelessly (like when
|
|
499
|
+
# the `store` parameter is set to `false`, or when an organization is enrolled
|
|
500
|
+
# in the zero data retention program).
|
|
501
|
+
include: nil,
|
|
502
|
+
# Body param: Text, image, or file inputs to the model, used to generate a
|
|
503
|
+
# response.
|
|
504
|
+
#
|
|
505
|
+
# Learn more:
|
|
506
|
+
#
|
|
507
|
+
# - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
508
|
+
# - [Image inputs](https://platform.openai.com/docs/guides/images)
|
|
509
|
+
# - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
|
|
510
|
+
# - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
|
|
511
|
+
# - [Function calling](https://platform.openai.com/docs/guides/function-calling)
|
|
512
|
+
input: nil,
|
|
513
|
+
# Body param: A system (or developer) message inserted into the model's context.
|
|
514
|
+
#
|
|
515
|
+
# When using along with `previous_response_id`, the instructions from a previous
|
|
516
|
+
# response will not be carried over to the next response. This makes it simple to
|
|
517
|
+
# swap out system (or developer) messages in new responses.
|
|
518
|
+
instructions: nil,
|
|
519
|
+
# Body param: An upper bound for the number of tokens that can be generated for a
|
|
520
|
+
# response, including visible output tokens and
|
|
521
|
+
# [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
522
|
+
max_output_tokens: nil,
|
|
523
|
+
# Body param: The maximum number of total calls to built-in tools that can be
|
|
524
|
+
# processed in a response. This maximum number applies across all built-in tool
|
|
525
|
+
# calls, not per individual tool. Any further attempts to call a tool by the model
|
|
526
|
+
# will be ignored.
|
|
527
|
+
max_tool_calls: nil,
|
|
528
|
+
# Body param: Set of 16 key-value pairs that can be attached to an object. This
|
|
529
|
+
# can be useful for storing additional information about the object in a
|
|
530
|
+
# structured format, and querying for objects via API or the dashboard.
|
|
531
|
+
#
|
|
532
|
+
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
533
|
+
# a maximum length of 512 characters.
|
|
534
|
+
metadata: nil,
|
|
535
|
+
# Body param: Model ID used to generate the response, like `gpt-4o` or `o3`.
|
|
536
|
+
# OpenAI offers a wide range of models with different capabilities, performance
|
|
537
|
+
# characteristics, and price points. Refer to the
|
|
538
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
539
|
+
# available models.
|
|
540
|
+
model: nil,
|
|
541
|
+
# Body param: Configuration for running moderation on the input and output of this
|
|
542
|
+
# response.
|
|
543
|
+
moderation: nil,
|
|
544
|
+
# Body param: Configuration for server-hosted multi-agent execution.
|
|
545
|
+
multi_agent: nil,
|
|
546
|
+
# Body param: Whether to allow the model to run tool calls in parallel.
|
|
547
|
+
parallel_tool_calls: nil,
|
|
548
|
+
# Body param: The unique ID of the previous response to the model. Use this to
|
|
549
|
+
# create multi-turn conversations. Learn more about
|
|
550
|
+
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
551
|
+
# Cannot be used in conjunction with `conversation`.
|
|
552
|
+
previous_response_id: nil,
|
|
553
|
+
# Body param: Reference to a prompt template and its variables.
|
|
554
|
+
# [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
555
|
+
prompt: nil,
|
|
556
|
+
# Body param: Used by OpenAI to cache responses for similar requests to optimize
|
|
557
|
+
# your cache hit rates. Replaces the `user` field.
|
|
558
|
+
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
559
|
+
prompt_cache_key: nil,
|
|
560
|
+
# Body param: Options for prompt caching. Supported for `gpt-5.6` and later
|
|
561
|
+
# models. By default, OpenAI automatically chooses one implicit cache breakpoint.
|
|
562
|
+
# You can add explicit breakpoints to content blocks with
|
|
563
|
+
# `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For
|
|
564
|
+
# cache matching, OpenAI considers up to the latest 80 breakpoints in the
|
|
565
|
+
# conversation, without a content-block lookback limit. Set `mode` to `explicit`
|
|
566
|
+
# to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
|
|
567
|
+
# currently the only supported value. See the
|
|
568
|
+
# [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
569
|
+
# for current details.
|
|
570
|
+
prompt_cache_options: nil,
|
|
571
|
+
# Body param: Deprecated. Use `prompt_cache_options.ttl` instead.
|
|
572
|
+
#
|
|
573
|
+
# The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
574
|
+
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
575
|
+
# of 24 hours.
|
|
576
|
+
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
577
|
+
# This field expresses a maximum retention policy, while
|
|
578
|
+
# `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
579
|
+
# are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
580
|
+
# models, only `24h` is supported.
|
|
581
|
+
#
|
|
582
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
583
|
+
# your organization's data retention policy:
|
|
584
|
+
#
|
|
585
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
586
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
587
|
+
# `prompt_cache_retention` is not specified.
|
|
588
|
+
prompt_cache_retention: nil,
|
|
589
|
+
# Body param: **gpt-5 and o-series models only**
|
|
590
|
+
#
|
|
591
|
+
# Configuration options for
|
|
592
|
+
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
593
|
+
reasoning: nil,
|
|
594
|
+
# Body param: A stable identifier used to help detect users of your application
|
|
595
|
+
# that may be violating OpenAI's usage policies. The IDs should be a string that
|
|
596
|
+
# uniquely identifies each user, with a maximum length of 64 characters. We
|
|
597
|
+
# recommend hashing their username or email address, in order to avoid sending us
|
|
598
|
+
# any identifying information.
|
|
599
|
+
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
600
|
+
safety_identifier: nil,
|
|
601
|
+
# Body param: Specifies the processing type used for serving the request.
|
|
602
|
+
#
|
|
603
|
+
# - If set to 'auto', then the request will be processed with the service tier
|
|
604
|
+
# configured in the Project settings. Unless otherwise configured, the Project
|
|
605
|
+
# will use 'default'.
|
|
606
|
+
# - If set to 'default', then the request will be processed with the standard
|
|
607
|
+
# pricing and performance for the selected model.
|
|
608
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
|
|
609
|
+
# '[priority](https://openai.com/api-priority-processing/)', then the request
|
|
610
|
+
# will be processed with the corresponding service tier.
|
|
611
|
+
# - When not set, the default behavior is 'auto'.
|
|
612
|
+
#
|
|
613
|
+
# When the `service_tier` parameter is set, the response body will include the
|
|
614
|
+
# `service_tier` value based on the processing mode actually used to serve the
|
|
615
|
+
# request. This response value may be different from the value set in the
|
|
616
|
+
# parameter.
|
|
617
|
+
service_tier: nil,
|
|
618
|
+
# Body param: Whether to store the generated model response for later retrieval
|
|
619
|
+
# via API.
|
|
620
|
+
store: nil,
|
|
621
|
+
# Body param: Options for streaming responses. Only set this when you set
|
|
622
|
+
# `stream: true`.
|
|
623
|
+
stream_options: nil,
|
|
624
|
+
# Body param: What sampling temperature to use, between 0 and 2. Higher values
|
|
625
|
+
# like 0.8 will make the output more random, while lower values like 0.2 will make
|
|
626
|
+
# it more focused and deterministic. We generally recommend altering this or
|
|
627
|
+
# `top_p` but not both.
|
|
628
|
+
temperature: nil,
|
|
629
|
+
# Body param: Configuration options for a text response from the model. Can be
|
|
630
|
+
# plain text or structured JSON data. Learn more:
|
|
631
|
+
#
|
|
632
|
+
# - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
633
|
+
# - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
634
|
+
text: nil,
|
|
635
|
+
# Body param: How the model should select which tool (or tools) to use when
|
|
636
|
+
# generating a response. See the `tools` parameter to see how to specify which
|
|
637
|
+
# tools the model can call.
|
|
638
|
+
tool_choice: nil,
|
|
639
|
+
# Body param: An array of tools the model may call while generating a response.
|
|
640
|
+
# You can specify which tool to use by setting the `tool_choice` parameter.
|
|
641
|
+
#
|
|
642
|
+
# We support the following categories of tools:
|
|
643
|
+
#
|
|
644
|
+
# - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
645
|
+
# capabilities, like
|
|
646
|
+
# [web search](https://platform.openai.com/docs/guides/tools-web-search) or
|
|
647
|
+
# [file search](https://platform.openai.com/docs/guides/tools-file-search).
|
|
648
|
+
# Learn more about
|
|
649
|
+
# [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
650
|
+
# - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
651
|
+
# predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
652
|
+
# [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
653
|
+
# - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
654
|
+
# the model to call your own code with strongly typed arguments and outputs.
|
|
655
|
+
# Learn more about
|
|
656
|
+
# [function calling](https://platform.openai.com/docs/guides/function-calling).
|
|
657
|
+
# You can also use custom tools to call your own code.
|
|
658
|
+
tools: nil,
|
|
659
|
+
# Body param: An integer between 0 and 20 specifying the maximum number of most
|
|
660
|
+
# likely tokens to return at each token position, each with an associated log
|
|
661
|
+
# probability. In some cases, the number of returned tokens may be fewer than
|
|
662
|
+
# requested.
|
|
663
|
+
top_logprobs: nil,
|
|
664
|
+
# Body param: An alternative to sampling with temperature, called nucleus
|
|
665
|
+
# sampling, where the model considers the results of the tokens with top_p
|
|
666
|
+
# probability mass. So 0.1 means only the tokens comprising the top 10%
|
|
667
|
+
# probability mass are considered.
|
|
668
|
+
#
|
|
669
|
+
# We generally recommend altering this or `temperature` but not both.
|
|
670
|
+
top_p: nil,
|
|
671
|
+
# Body param: The truncation strategy to use for the model response.
|
|
672
|
+
#
|
|
673
|
+
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
674
|
+
# the model will truncate the response to fit the context window by dropping
|
|
675
|
+
# items from the beginning of the conversation.
|
|
676
|
+
# - `disabled` (default): If the input size will exceed the context window size
|
|
677
|
+
# for a model, the request will fail with a 400 error.
|
|
678
|
+
truncation: nil,
|
|
679
|
+
# Body param: This field is being replaced by `safety_identifier` and
|
|
680
|
+
# `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
|
|
681
|
+
# optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
682
|
+
# rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
683
|
+
# abuse.
|
|
684
|
+
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
685
|
+
user: nil,
|
|
686
|
+
# Header param: Optional beta features to enable for this request.
|
|
687
|
+
betas: nil,
|
|
688
|
+
# There is no need to provide `stream:`. Instead, use `#stream_raw` or `#create`
|
|
689
|
+
# for streaming and non-streaming use cases, respectively.
|
|
690
|
+
stream: true,
|
|
691
|
+
request_options: {}
|
|
692
|
+
)
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
# See {OpenAI::Resources::Beta::Responses#retrieve_streaming} for streaming
|
|
696
|
+
# counterpart.
|
|
697
|
+
#
|
|
698
|
+
# Retrieves a model response with the given ID.
|
|
699
|
+
sig do
|
|
700
|
+
params(
|
|
701
|
+
response_id: String,
|
|
702
|
+
include: T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol],
|
|
703
|
+
include_obfuscation: T::Boolean,
|
|
704
|
+
starting_after: Integer,
|
|
705
|
+
betas:
|
|
706
|
+
T::Array[OpenAI::Beta::ResponseRetrieveParams::Beta::OrSymbol],
|
|
707
|
+
stream: T.noreturn,
|
|
708
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
709
|
+
).returns(OpenAI::Beta::BetaResponse)
|
|
710
|
+
end
|
|
711
|
+
def retrieve(
|
|
712
|
+
# Path param: The ID of the response to retrieve.
|
|
713
|
+
response_id,
|
|
714
|
+
# Query param: Additional fields to include in the response. See the `include`
|
|
715
|
+
# parameter for Response creation above for more information.
|
|
716
|
+
include: nil,
|
|
717
|
+
# Query param: When true, stream obfuscation will be enabled. Stream obfuscation
|
|
718
|
+
# adds random characters to an `obfuscation` field on streaming delta events to
|
|
719
|
+
# normalize payload sizes as a mitigation to certain side-channel attacks. These
|
|
720
|
+
# obfuscation fields are included by default, but add a small amount of overhead
|
|
721
|
+
# to the data stream. You can set `include_obfuscation` to false to optimize for
|
|
722
|
+
# bandwidth if you trust the network links between your application and the OpenAI
|
|
723
|
+
# API.
|
|
724
|
+
include_obfuscation: nil,
|
|
725
|
+
# Query param: The sequence number of the event after which to start streaming.
|
|
726
|
+
starting_after: nil,
|
|
727
|
+
# Header param: Optional beta features to enable for this request.
|
|
728
|
+
betas: nil,
|
|
729
|
+
# There is no need to provide `stream:`. Instead, use `#retrieve_streaming` or
|
|
730
|
+
# `#retrieve` for streaming and non-streaming use cases, respectively.
|
|
731
|
+
stream: false,
|
|
732
|
+
request_options: {}
|
|
733
|
+
)
|
|
734
|
+
end
|
|
735
|
+
|
|
736
|
+
# See {OpenAI::Resources::Beta::Responses#retrieve} for non-streaming counterpart.
|
|
737
|
+
#
|
|
738
|
+
# Retrieves a model response with the given ID.
|
|
739
|
+
sig do
|
|
740
|
+
params(
|
|
741
|
+
response_id: String,
|
|
742
|
+
include: T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol],
|
|
743
|
+
include_obfuscation: T::Boolean,
|
|
744
|
+
starting_after: Integer,
|
|
745
|
+
betas:
|
|
746
|
+
T::Array[OpenAI::Beta::ResponseRetrieveParams::Beta::OrSymbol],
|
|
747
|
+
stream: T.noreturn,
|
|
748
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
749
|
+
).returns(
|
|
750
|
+
OpenAI::Internal::Stream[
|
|
751
|
+
OpenAI::Beta::BetaResponseStreamEvent::Variants
|
|
752
|
+
]
|
|
753
|
+
)
|
|
754
|
+
end
|
|
755
|
+
def retrieve_streaming(
|
|
756
|
+
# Path param: The ID of the response to retrieve.
|
|
757
|
+
response_id,
|
|
758
|
+
# Query param: Additional fields to include in the response. See the `include`
|
|
759
|
+
# parameter for Response creation above for more information.
|
|
760
|
+
include: nil,
|
|
761
|
+
# Query param: When true, stream obfuscation will be enabled. Stream obfuscation
|
|
762
|
+
# adds random characters to an `obfuscation` field on streaming delta events to
|
|
763
|
+
# normalize payload sizes as a mitigation to certain side-channel attacks. These
|
|
764
|
+
# obfuscation fields are included by default, but add a small amount of overhead
|
|
765
|
+
# to the data stream. You can set `include_obfuscation` to false to optimize for
|
|
766
|
+
# bandwidth if you trust the network links between your application and the OpenAI
|
|
767
|
+
# API.
|
|
768
|
+
include_obfuscation: nil,
|
|
769
|
+
# Query param: The sequence number of the event after which to start streaming.
|
|
770
|
+
starting_after: nil,
|
|
771
|
+
# Header param: Optional beta features to enable for this request.
|
|
772
|
+
betas: nil,
|
|
773
|
+
# There is no need to provide `stream:`. Instead, use `#retrieve_streaming` or
|
|
774
|
+
# `#retrieve` for streaming and non-streaming use cases, respectively.
|
|
775
|
+
stream: true,
|
|
776
|
+
request_options: {}
|
|
777
|
+
)
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
# Deletes a model response with the given ID.
|
|
781
|
+
sig do
|
|
782
|
+
params(
|
|
783
|
+
response_id: String,
|
|
784
|
+
betas: T::Array[OpenAI::Beta::ResponseDeleteParams::Beta::OrSymbol],
|
|
785
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
786
|
+
).void
|
|
787
|
+
end
|
|
788
|
+
def delete(
|
|
789
|
+
# The ID of the response to delete.
|
|
790
|
+
response_id,
|
|
791
|
+
# Optional beta features to enable for this request.
|
|
792
|
+
betas: nil,
|
|
793
|
+
request_options: {}
|
|
794
|
+
)
|
|
795
|
+
end
|
|
796
|
+
|
|
797
|
+
# Cancels a model response with the given ID. Only responses created with the
|
|
798
|
+
# `background` parameter set to `true` can be cancelled.
|
|
799
|
+
# [Learn more](https://platform.openai.com/docs/guides/background).
|
|
800
|
+
sig do
|
|
801
|
+
params(
|
|
802
|
+
response_id: String,
|
|
803
|
+
betas: T::Array[OpenAI::Beta::ResponseCancelParams::Beta::OrSymbol],
|
|
804
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
805
|
+
).returns(OpenAI::Beta::BetaResponse)
|
|
806
|
+
end
|
|
807
|
+
def cancel(
|
|
808
|
+
# The ID of the response to cancel.
|
|
809
|
+
response_id,
|
|
810
|
+
# Optional beta features to enable for this request.
|
|
811
|
+
betas: nil,
|
|
812
|
+
request_options: {}
|
|
813
|
+
)
|
|
814
|
+
end
|
|
815
|
+
|
|
816
|
+
# Compact a conversation. Returns a compacted response object.
|
|
817
|
+
#
|
|
818
|
+
# Learn when and how to compact long-running conversations in the
|
|
819
|
+
# [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window).
|
|
820
|
+
# For ZDR-compatible compaction details, see
|
|
821
|
+
# [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced).
|
|
822
|
+
sig do
|
|
823
|
+
params(
|
|
824
|
+
model:
|
|
825
|
+
T.nilable(
|
|
826
|
+
T.any(
|
|
827
|
+
OpenAI::Beta::ResponseCompactParams::Model::OrSymbol,
|
|
828
|
+
String
|
|
829
|
+
)
|
|
830
|
+
),
|
|
831
|
+
input:
|
|
832
|
+
T.nilable(OpenAI::Beta::ResponseCompactParams::Input::Variants),
|
|
833
|
+
instructions: T.nilable(String),
|
|
834
|
+
previous_response_id: T.nilable(String),
|
|
835
|
+
prompt_cache_key: T.nilable(String),
|
|
836
|
+
prompt_cache_options:
|
|
837
|
+
T.nilable(
|
|
838
|
+
OpenAI::Beta::ResponseCompactParams::PromptCacheOptions::OrHash
|
|
839
|
+
),
|
|
840
|
+
prompt_cache_retention:
|
|
841
|
+
T.nilable(
|
|
842
|
+
OpenAI::Beta::ResponseCompactParams::PromptCacheRetention::OrSymbol
|
|
843
|
+
),
|
|
844
|
+
service_tier:
|
|
845
|
+
T.nilable(
|
|
846
|
+
OpenAI::Beta::ResponseCompactParams::ServiceTier::OrSymbol
|
|
847
|
+
),
|
|
848
|
+
betas:
|
|
849
|
+
T::Array[OpenAI::Beta::ResponseCompactParams::Beta::OrSymbol],
|
|
850
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
851
|
+
).returns(OpenAI::Beta::BetaCompactedResponse)
|
|
852
|
+
end
|
|
853
|
+
def compact(
|
|
854
|
+
# Body param: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI
|
|
855
|
+
# offers a wide range of models with different capabilities, performance
|
|
856
|
+
# characteristics, and price points. Refer to the
|
|
857
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
858
|
+
# available models.
|
|
859
|
+
model:,
|
|
860
|
+
# Body param: Text, image, or file inputs to the model, used to generate a
|
|
861
|
+
# response
|
|
862
|
+
input: nil,
|
|
863
|
+
# Body param: A system (or developer) message inserted into the model's context.
|
|
864
|
+
# When used along with `previous_response_id`, the instructions from a previous
|
|
865
|
+
# response will not be carried over to the next response. This makes it simple to
|
|
866
|
+
# swap out system (or developer) messages in new responses.
|
|
867
|
+
instructions: nil,
|
|
868
|
+
# Body param: The unique ID of the previous response to the model. Use this to
|
|
869
|
+
# create multi-turn conversations. Learn more about
|
|
870
|
+
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
871
|
+
# Cannot be used in conjunction with `conversation`.
|
|
872
|
+
previous_response_id: nil,
|
|
873
|
+
# Body param: A key to use when reading from or writing to the prompt cache.
|
|
874
|
+
prompt_cache_key: nil,
|
|
875
|
+
# Body param: Options for prompt caching. Supported for `gpt-5.6` and later
|
|
876
|
+
# models. By default, OpenAI automatically chooses one implicit cache breakpoint.
|
|
877
|
+
# You can add explicit breakpoints to content blocks with
|
|
878
|
+
# `prompt_cache_breakpoint`. Each request can write up to four breakpoints. For
|
|
879
|
+
# cache matching, OpenAI considers up to the latest 80 breakpoints in the
|
|
880
|
+
# conversation, without a content-block lookback limit. Set `mode` to `explicit`
|
|
881
|
+
# to disable the implicit breakpoint. The `ttl` defaults to `30m`, which is
|
|
882
|
+
# currently the only supported value. See the
|
|
883
|
+
# [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
884
|
+
# for current details.
|
|
885
|
+
prompt_cache_options: nil,
|
|
886
|
+
# Body param: How long to retain a prompt cache entry created by this request.
|
|
887
|
+
prompt_cache_retention: nil,
|
|
888
|
+
# Body param: The service tier to use for this request.
|
|
889
|
+
service_tier: nil,
|
|
890
|
+
# Header param: Optional beta features to enable for this request.
|
|
891
|
+
betas: nil,
|
|
892
|
+
request_options: {}
|
|
893
|
+
)
|
|
894
|
+
end
|
|
895
|
+
|
|
896
|
+
# @api private
|
|
897
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
898
|
+
def self.new(client:)
|
|
899
|
+
end
|
|
900
|
+
end
|
|
901
|
+
end
|
|
902
|
+
end
|
|
903
|
+
end
|