openai 0.99.0 → 0.101.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 +26 -0
- data/README.md +1 -1
- data/bedrock.md +17 -1
- data/lib/openai/client.rb +13 -0
- data/lib/openai/helpers/agents/session_stream.rb +11 -36
- data/lib/openai/helpers/agents/tools.rb +34 -4
- data/lib/openai/helpers/beta/agents/creation_stream.rb +26 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +11 -4
- data/lib/openai/helpers/beta/agents/tool_dispatcher.rb +74 -0
- data/lib/openai/helpers/beta/agents/tool_error.rb +28 -0
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_completions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
- data/lib/openai/models/admin/organization/usage_costs_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_images_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +125 -3
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +6 -6
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +3 -6
- data/lib/openai/models/beta/agents/sessions/turns/item_list_params.rb +79 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/beta/beta_response_error.rb +12 -1
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +1166 -3
- data/lib/openai/models/beta/beta_responses_server_event.rb +12 -1
- data/lib/openai/models/beta/beta_tool.rb +12 -9
- data/lib/openai/models/beta/beta_tool_search_output_namespace_tool.rb +176 -0
- data/lib/openai/models/beta/environment_param.rb +6 -6
- data/lib/openai/models/beta/session_turn_error.rb +9 -0
- data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
- data/lib/openai/models/decision.rb +313 -0
- data/lib/openai/models/decision_create_params.rb +233 -0
- data/lib/openai/models/decision_input_image.rb +53 -0
- data/lib/openai/models/decision_input_message.rb +60 -0
- data/lib/openai/models/decision_input_part.rb +20 -0
- data/lib/openai/models/decision_input_text.rb +21 -0
- data/lib/openai/models/error_object.rb +12 -1
- data/lib/openai/models/eval_create_params.rb +1 -1
- data/lib/openai/models/eval_create_response.rb +1 -1
- data/lib/openai/models/eval_list_response.rb +1 -1
- data/lib/openai/models/eval_retrieve_response.rb +1 -1
- data/lib/openai/models/eval_update_response.rb +1 -1
- data/lib/openai/models/fine_tuning/job_list_params.rb +14 -4
- data/lib/openai/models/graders/score_model_grader.rb +2 -2
- data/lib/openai/models/image_edit_params.rb +12 -9
- data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
- data/lib/openai/models/realtime/session_update_event.rb +16 -0
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/responses/response_error.rb +12 -1
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +1166 -3
- data/lib/openai/models/responses/responses_server_event.rb +12 -1
- data/lib/openai/models/responses/tool.rb +12 -9
- data/lib/openai/models/responses/tool_search_output_namespace_tool.rb +174 -0
- data/lib/openai/models/video_create_error.rb +12 -1
- data/lib/openai/models.rb +12 -0
- data/lib/openai/providers/bedrock.rb +20 -1
- data/lib/openai/resources/admin/organization/usage.rb +15 -6
- data/lib/openai/resources/beta/agents/environments/templates.rb +3 -4
- data/lib/openai/resources/beta/agents/sessions/turns/items.rb +68 -0
- data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -2
- data/lib/openai/resources/decisions.rb +59 -0
- data/lib/openai/resources/fine_tuning/jobs.rb +7 -2
- data/lib/openai/resources/images.rb +8 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +11 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/helpers/agents.rbi +2 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +8 -3
- data/rbi/openai/helpers/beta/agents/tool_error.rbi +19 -0
- data/rbi/openai/helpers/beta/agents.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_web_search_calls_params.rbi +12 -4
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +194 -1
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +6 -6
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +3 -6
- data/rbi/openai/models/beta/agents/sessions/turns/item_list_params.rbi +139 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_error.rbi +12 -0
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +1893 -18
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +12 -0
- data/rbi/openai/models/beta/beta_tool.rbi +12 -9
- data/rbi/openai/models/beta/beta_tool_search_output_namespace_tool.rbi +272 -0
- data/rbi/openai/models/beta/environment_param.rbi +6 -6
- data/rbi/openai/models/beta/session_turn_error.rbi +18 -0
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +123 -17
- data/rbi/openai/models/decision.rbi +586 -0
- data/rbi/openai/models/decision_create_params.rbi +435 -0
- data/rbi/openai/models/decision_input_image.rbi +81 -0
- data/rbi/openai/models/decision_input_message.rbi +96 -0
- data/rbi/openai/models/decision_input_part.rbi +24 -0
- data/rbi/openai/models/decision_input_text.rbi +49 -0
- data/rbi/openai/models/error_object.rbi +12 -0
- data/rbi/openai/models/eval_create_params.rbi +1 -1
- data/rbi/openai/models/eval_create_response.rbi +1 -1
- data/rbi/openai/models/eval_list_response.rbi +1 -1
- data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
- data/rbi/openai/models/eval_update_response.rbi +1 -1
- data/rbi/openai/models/fine_tuning/job_list_params.rbi +14 -4
- data/rbi/openai/models/graders/score_model_grader.rbi +2 -2
- data/rbi/openai/models/image_edit_params.rbi +12 -9
- data/rbi/openai/models/realtime/session_update_event.rbi +16 -0
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/responses/response_error.rbi +12 -0
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +1901 -18
- data/rbi/openai/models/responses/responses_server_event.rbi +12 -0
- data/rbi/openai/models/responses/tool.rbi +12 -9
- data/rbi/openai/models/responses/tool_search_output_namespace_tool.rbi +272 -0
- data/rbi/openai/models/video_create_error.rbi +12 -0
- data/rbi/openai/models.rbi +12 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +15 -6
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +3 -4
- data/rbi/openai/resources/beta/agents/sessions/turns/items.rbi +62 -0
- data/rbi/openai/resources/beta/agents/sessions/turns.rbi +3 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +2 -0
- data/rbi/openai/resources/decisions.rbi +57 -0
- data/rbi/openai/resources/fine_tuning/jobs.rbi +7 -2
- data/rbi/openai/resources/images.rbi +8 -6
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/helpers/agents.rbs +3 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +5 -2
- data/sig/openai/helpers/beta/agents/tool_error.rbs +17 -0
- data/sig/openai/helpers/beta/agents.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_images_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +19 -7
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +87 -2
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +4 -4
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +2 -4
- data/sig/openai/models/beta/agents/sessions/turns/item_list_params.rbs +91 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/beta/beta_response_error.rbs +10 -0
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +993 -4
- data/sig/openai/models/beta/beta_responses_server_event.rbs +10 -0
- data/sig/openai/models/beta/beta_tool.rbs +8 -6
- data/sig/openai/models/beta/beta_tool_search_output_namespace_tool.rbs +162 -0
- data/sig/openai/models/beta/environment_param.rbs +4 -4
- data/sig/openai/models/beta/session_turn_error.rbs +12 -0
- data/sig/openai/models/chat/chat_completion_chunk.rbs +96 -12
- data/sig/openai/models/decision.rbs +296 -0
- data/sig/openai/models/decision_create_params.rbs +227 -0
- data/sig/openai/models/decision_input_image.rbs +51 -0
- data/sig/openai/models/decision_input_message.rbs +57 -0
- data/sig/openai/models/decision_input_part.rbs +12 -0
- data/sig/openai/models/decision_input_text.rbs +15 -0
- data/sig/openai/models/error_object.rbs +10 -0
- data/sig/openai/models/eval_create_params.rbs +1 -1
- data/sig/openai/models/eval_create_response.rbs +1 -1
- data/sig/openai/models/eval_list_response.rbs +1 -1
- data/sig/openai/models/eval_retrieve_response.rbs +1 -1
- data/sig/openai/models/eval_update_response.rbs +1 -1
- data/sig/openai/models/fine_tuning/job_list_params.rbs +14 -4
- data/sig/openai/models/graders/score_model_grader.rbs +3 -3
- data/sig/openai/models/image_edit_params.rbs +8 -6
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +10 -0
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +993 -4
- data/sig/openai/models/responses/responses_server_event.rbs +10 -0
- data/sig/openai/models/responses/tool.rbs +8 -6
- data/sig/openai/models/responses/tool_search_output_namespace_tool.rbs +160 -0
- data/sig/openai/models/video_create_error.rbs +10 -0
- data/sig/openai/models.rbs +12 -0
- data/sig/openai/resources/beta/agents/sessions/turns/items.rbs +24 -0
- data/sig/openai/resources/beta/agents/sessions/turns.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
- data/sig/openai/resources/decisions.rbs +15 -0
- metadata +38 -1
|
@@ -5,7 +5,7 @@ module OpenAI
|
|
|
5
5
|
module Beta
|
|
6
6
|
type beta_response_tool_search_output_item_param =
|
|
7
7
|
{
|
|
8
|
-
tools: ::Array[OpenAI::Models::Beta::
|
|
8
|
+
tools: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::tool],
|
|
9
9
|
?type: :tool_search_output,
|
|
10
10
|
?id: String?,
|
|
11
11
|
?agent: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Agent?,
|
|
@@ -16,7 +16,7 @@ module OpenAI
|
|
|
16
16
|
|
|
17
17
|
class BetaResponseToolSearchOutputItemParam < OpenAI::Internal::Type::BaseModel
|
|
18
18
|
# The loaded tool definitions returned by the tool search output.
|
|
19
|
-
attr_accessor tools: ::Array[OpenAI::Models::Beta::
|
|
19
|
+
attr_accessor tools: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::tool]
|
|
20
20
|
|
|
21
21
|
# The item type. Always `tool_search_output`.
|
|
22
22
|
attr_accessor type: :tool_search_output
|
|
@@ -56,7 +56,7 @@ module OpenAI
|
|
|
56
56
|
# @param type
|
|
57
57
|
# The item type. Always `tool_search_output`.
|
|
58
58
|
def initialize: (
|
|
59
|
-
tools: ::Array[OpenAI::Models::Beta::
|
|
59
|
+
tools: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::tool],
|
|
60
60
|
?id: String?,
|
|
61
61
|
?agent: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Agent?,
|
|
62
62
|
?call_id: String?,
|
|
@@ -66,7 +66,7 @@ module OpenAI
|
|
|
66
66
|
) -> void
|
|
67
67
|
|
|
68
68
|
def to_hash: -> {
|
|
69
|
-
tools: ::Array[OpenAI::Models::Beta::
|
|
69
|
+
tools: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::tool],
|
|
70
70
|
?type: :tool_search_output,
|
|
71
71
|
?id: String?,
|
|
72
72
|
?agent: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Agent?,
|
|
@@ -75,6 +75,995 @@ module OpenAI
|
|
|
75
75
|
?status: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::status?
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
type tool =
|
|
79
|
+
OpenAI::Beta::BetaFunctionTool
|
|
80
|
+
| OpenAI::Beta::BetaFileSearchTool
|
|
81
|
+
| OpenAI::Beta::BetaComputerTool
|
|
82
|
+
| OpenAI::Beta::BetaComputerUsePreviewTool
|
|
83
|
+
| OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp
|
|
84
|
+
| OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter
|
|
85
|
+
| OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ProgrammaticToolCalling
|
|
86
|
+
| OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration
|
|
87
|
+
| OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::LocalShell
|
|
88
|
+
| OpenAI::Beta::BetaFunctionShellTool
|
|
89
|
+
| OpenAI::Beta::BetaCustomTool
|
|
90
|
+
| OpenAI::Beta::BetaToolSearchOutputNamespaceTool
|
|
91
|
+
| OpenAI::Beta::BetaToolSearchTool
|
|
92
|
+
| OpenAI::Beta::BetaApplyPatchTool
|
|
93
|
+
| OpenAI::Beta::BetaWebSearchTool
|
|
94
|
+
| OpenAI::Beta::BetaWebSearchPreviewTool
|
|
95
|
+
|
|
96
|
+
module Tool
|
|
97
|
+
extend OpenAI::Internal::Type::Union
|
|
98
|
+
|
|
99
|
+
type mcp =
|
|
100
|
+
{
|
|
101
|
+
server_label: String,
|
|
102
|
+
?type: :mcp,
|
|
103
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_caller]?,
|
|
104
|
+
?allowed_tools: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_tools?,
|
|
105
|
+
?authorization: String,
|
|
106
|
+
?connector_id: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::connector_id,
|
|
107
|
+
?defer_loading: bool,
|
|
108
|
+
?headers: ::Hash[Symbol, String]?,
|
|
109
|
+
?require_approval: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::require_approval?,
|
|
110
|
+
?server_description: String,
|
|
111
|
+
?server_url: String,
|
|
112
|
+
?tunnel_id: String
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
116
|
+
# A label for this MCP server, used to identify it in tool calls.
|
|
117
|
+
attr_accessor server_label: String
|
|
118
|
+
|
|
119
|
+
# The type of the MCP tool. Always `mcp`.
|
|
120
|
+
attr_accessor type: :mcp
|
|
121
|
+
|
|
122
|
+
# The tool invocation context(s).
|
|
123
|
+
attr_accessor allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_caller]?
|
|
124
|
+
|
|
125
|
+
# List of allowed tool names or a filter object.
|
|
126
|
+
attr_accessor allowed_tools: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_tools?
|
|
127
|
+
|
|
128
|
+
# An OAuth access token that can be used with a remote MCP server, either with a
|
|
129
|
+
# custom MCP server URL or a service connector. Your application must handle the
|
|
130
|
+
# OAuth authorization flow and provide the token here.
|
|
131
|
+
attr_reader authorization: String?
|
|
132
|
+
|
|
133
|
+
# An OAuth access token that can be used with a remote MCP server, either with a
|
|
134
|
+
# custom MCP server URL or a service connector. Your application must handle the
|
|
135
|
+
# OAuth authorization flow and provide the token here.
|
|
136
|
+
def authorization=: (String) -> String
|
|
137
|
+
|
|
138
|
+
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
139
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
140
|
+
# service connectors
|
|
141
|
+
# [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
142
|
+
#
|
|
143
|
+
# This field is deprecated for models released after September 1, 2026. Use
|
|
144
|
+
# `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
|
|
145
|
+
# through a Secure MCP Tunnel.
|
|
146
|
+
#
|
|
147
|
+
# Currently supported `connector_id` values are:
|
|
148
|
+
#
|
|
149
|
+
# - Dropbox: `connector_dropbox`
|
|
150
|
+
# - Gmail: `connector_gmail`
|
|
151
|
+
# - Google Calendar: `connector_googlecalendar`
|
|
152
|
+
# - Google Drive: `connector_googledrive`
|
|
153
|
+
# - Microsoft Teams: `connector_microsoftteams`
|
|
154
|
+
# - Outlook Calendar: `connector_outlookcalendar`
|
|
155
|
+
# - Outlook Email: `connector_outlookemail`
|
|
156
|
+
# - SharePoint: `connector_sharepoint`
|
|
157
|
+
attr_reader connector_id: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::connector_id?
|
|
158
|
+
|
|
159
|
+
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
160
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
161
|
+
# service connectors
|
|
162
|
+
# [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
163
|
+
#
|
|
164
|
+
# This field is deprecated for models released after September 1, 2026. Use
|
|
165
|
+
# `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
|
|
166
|
+
# through a Secure MCP Tunnel.
|
|
167
|
+
#
|
|
168
|
+
# Currently supported `connector_id` values are:
|
|
169
|
+
#
|
|
170
|
+
# - Dropbox: `connector_dropbox`
|
|
171
|
+
# - Gmail: `connector_gmail`
|
|
172
|
+
# - Google Calendar: `connector_googlecalendar`
|
|
173
|
+
# - Google Drive: `connector_googledrive`
|
|
174
|
+
# - Microsoft Teams: `connector_microsoftteams`
|
|
175
|
+
# - Outlook Calendar: `connector_outlookcalendar`
|
|
176
|
+
# - Outlook Email: `connector_outlookemail`
|
|
177
|
+
# - SharePoint: `connector_sharepoint`
|
|
178
|
+
def connector_id=: (
|
|
179
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::connector_id
|
|
180
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::connector_id
|
|
181
|
+
|
|
182
|
+
# Whether this MCP tool is deferred and discovered via tool search.
|
|
183
|
+
attr_reader defer_loading: bool?
|
|
184
|
+
|
|
185
|
+
# Whether this MCP tool is deferred and discovered via tool search.
|
|
186
|
+
def defer_loading=: (bool) -> bool
|
|
187
|
+
|
|
188
|
+
# Optional HTTP headers to send to the MCP server. Use for authentication or other
|
|
189
|
+
# purposes.
|
|
190
|
+
attr_accessor headers: ::Hash[Symbol, String]?
|
|
191
|
+
|
|
192
|
+
# Specify which of the MCP server's tools require approval.
|
|
193
|
+
attr_accessor require_approval: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::require_approval?
|
|
194
|
+
|
|
195
|
+
# Optional description of the MCP server, used to provide more context.
|
|
196
|
+
attr_reader server_description: String?
|
|
197
|
+
|
|
198
|
+
# Optional description of the MCP server, used to provide more context.
|
|
199
|
+
def server_description=: (String) -> String
|
|
200
|
+
|
|
201
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
202
|
+
# must be provided.
|
|
203
|
+
attr_reader server_url: String?
|
|
204
|
+
|
|
205
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
206
|
+
# must be provided.
|
|
207
|
+
def server_url=: (String) -> String
|
|
208
|
+
|
|
209
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
210
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
211
|
+
attr_reader tunnel_id: String?
|
|
212
|
+
|
|
213
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
214
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
215
|
+
def tunnel_id=: (String) -> String
|
|
216
|
+
|
|
217
|
+
# @param server_label
|
|
218
|
+
# A label for this MCP server, used to identify it in tool calls.
|
|
219
|
+
# @param allowed_callers
|
|
220
|
+
# The tool invocation context(s).
|
|
221
|
+
# @param allowed_tools
|
|
222
|
+
# List of allowed tool names or a filter object.
|
|
223
|
+
# @param authorization
|
|
224
|
+
# An OAuth access token that can be used with a remote MCP server, either with a
|
|
225
|
+
# custom MCP server URL or a service connector. Your application must handle the
|
|
226
|
+
# OAuth authorization flow and provide the token here.
|
|
227
|
+
# @param connector_id
|
|
228
|
+
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
229
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
230
|
+
# service connectors
|
|
231
|
+
# [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
232
|
+
#
|
|
233
|
+
# This field is deprecated for models released after September 1, 2026. Use
|
|
234
|
+
# `server_url` to connect to a remote MCP server, or `tunnel_id` to connect
|
|
235
|
+
# through a Secure MCP Tunnel.
|
|
236
|
+
#
|
|
237
|
+
# Currently supported `connector_id` values are:
|
|
238
|
+
#
|
|
239
|
+
# - Dropbox: `connector_dropbox`
|
|
240
|
+
# - Gmail: `connector_gmail`
|
|
241
|
+
# - Google Calendar: `connector_googlecalendar`
|
|
242
|
+
# - Google Drive: `connector_googledrive`
|
|
243
|
+
# - Microsoft Teams: `connector_microsoftteams`
|
|
244
|
+
# - Outlook Calendar: `connector_outlookcalendar`
|
|
245
|
+
# - Outlook Email: `connector_outlookemail`
|
|
246
|
+
# - SharePoint: `connector_sharepoint`
|
|
247
|
+
# @param defer_loading
|
|
248
|
+
# Whether this MCP tool is deferred and discovered via tool search.
|
|
249
|
+
# @param headers
|
|
250
|
+
# Optional HTTP headers to send to the MCP server. Use for authentication or other
|
|
251
|
+
# purposes.
|
|
252
|
+
# @param require_approval
|
|
253
|
+
# Specify which of the MCP server's tools require approval.
|
|
254
|
+
# @param server_description
|
|
255
|
+
# Optional description of the MCP server, used to provide more context.
|
|
256
|
+
# @param server_url
|
|
257
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
258
|
+
# must be provided.
|
|
259
|
+
# @param tunnel_id
|
|
260
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
261
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
262
|
+
# @param type
|
|
263
|
+
# The type of the MCP tool. Always `mcp`.
|
|
264
|
+
def initialize: (
|
|
265
|
+
server_label: String,
|
|
266
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_caller]?,
|
|
267
|
+
?allowed_tools: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_tools?,
|
|
268
|
+
?authorization: String,
|
|
269
|
+
?connector_id: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::connector_id,
|
|
270
|
+
?defer_loading: bool,
|
|
271
|
+
?headers: ::Hash[Symbol, String]?,
|
|
272
|
+
?require_approval: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::require_approval?,
|
|
273
|
+
?server_description: String,
|
|
274
|
+
?server_url: String,
|
|
275
|
+
?tunnel_id: String,
|
|
276
|
+
?type: :mcp
|
|
277
|
+
) -> void
|
|
278
|
+
|
|
279
|
+
def to_hash: -> {
|
|
280
|
+
server_label: String,
|
|
281
|
+
?type: :mcp,
|
|
282
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_caller]?,
|
|
283
|
+
?allowed_tools: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_tools?,
|
|
284
|
+
?authorization: String,
|
|
285
|
+
?connector_id: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::connector_id,
|
|
286
|
+
?defer_loading: bool,
|
|
287
|
+
?headers: ::Hash[Symbol, String]?,
|
|
288
|
+
?require_approval: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::require_approval?,
|
|
289
|
+
?server_description: String,
|
|
290
|
+
?server_url: String,
|
|
291
|
+
?tunnel_id: String
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
type allowed_caller = :direct | :programmatic
|
|
295
|
+
|
|
296
|
+
module AllowedCaller
|
|
297
|
+
extend OpenAI::Internal::Type::Enum
|
|
298
|
+
|
|
299
|
+
DIRECT: :direct
|
|
300
|
+
PROGRAMMATIC: :programmatic
|
|
301
|
+
|
|
302
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_caller]
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
type allowed_tools =
|
|
306
|
+
::Array[String]
|
|
307
|
+
| OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::AllowedTools::McpToolFilter
|
|
308
|
+
|
|
309
|
+
module AllowedTools
|
|
310
|
+
extend OpenAI::Internal::Type::Union
|
|
311
|
+
|
|
312
|
+
type mcp_tool_filter =
|
|
313
|
+
{ ?read_only: bool, ?tool_names: ::Array[String] }
|
|
314
|
+
|
|
315
|
+
class McpToolFilter < OpenAI::Internal::Type::BaseModel
|
|
316
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
317
|
+
# is
|
|
318
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
319
|
+
# it will match this filter.
|
|
320
|
+
attr_reader read_only: bool?
|
|
321
|
+
|
|
322
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
323
|
+
# is
|
|
324
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
325
|
+
# it will match this filter.
|
|
326
|
+
def read_only=: (bool) -> bool
|
|
327
|
+
|
|
328
|
+
# List of allowed tool names.
|
|
329
|
+
attr_reader tool_names: ::Array[String]?
|
|
330
|
+
|
|
331
|
+
# List of allowed tool names.
|
|
332
|
+
def tool_names=: (::Array[String]) -> ::Array[String]
|
|
333
|
+
|
|
334
|
+
# @param read_only
|
|
335
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
336
|
+
# is
|
|
337
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
338
|
+
# it will match this filter.
|
|
339
|
+
# @param tool_names
|
|
340
|
+
# List of allowed tool names.
|
|
341
|
+
def initialize: (
|
|
342
|
+
?read_only: bool,
|
|
343
|
+
?tool_names: ::Array[String]
|
|
344
|
+
) -> void
|
|
345
|
+
|
|
346
|
+
def to_hash: -> {
|
|
347
|
+
?read_only: bool,
|
|
348
|
+
?tool_names: ::Array[String]
|
|
349
|
+
}
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::allowed_tools]
|
|
353
|
+
|
|
354
|
+
StringArray: OpenAI::Internal::Type::Converter
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
type connector_id =
|
|
358
|
+
:connector_dropbox
|
|
359
|
+
| :connector_gmail
|
|
360
|
+
| :connector_googlecalendar
|
|
361
|
+
| :connector_googledrive
|
|
362
|
+
| :connector_microsoftteams
|
|
363
|
+
| :connector_outlookcalendar
|
|
364
|
+
| :connector_outlookemail
|
|
365
|
+
| :connector_sharepoint
|
|
366
|
+
|
|
367
|
+
module ConnectorID
|
|
368
|
+
extend OpenAI::Internal::Type::Enum
|
|
369
|
+
|
|
370
|
+
CONNECTOR_DROPBOX: :connector_dropbox
|
|
371
|
+
CONNECTOR_GMAIL: :connector_gmail
|
|
372
|
+
CONNECTOR_GOOGLECALENDAR: :connector_googlecalendar
|
|
373
|
+
CONNECTOR_GOOGLEDRIVE: :connector_googledrive
|
|
374
|
+
CONNECTOR_MICROSOFTTEAMS: :connector_microsoftteams
|
|
375
|
+
CONNECTOR_OUTLOOKCALENDAR: :connector_outlookcalendar
|
|
376
|
+
CONNECTOR_OUTLOOKEMAIL: :connector_outlookemail
|
|
377
|
+
CONNECTOR_SHAREPOINT: :connector_sharepoint
|
|
378
|
+
|
|
379
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::connector_id]
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
type require_approval =
|
|
383
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter
|
|
384
|
+
| OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::mcp_tool_approval_setting
|
|
385
|
+
|
|
386
|
+
module RequireApproval
|
|
387
|
+
extend OpenAI::Internal::Type::Union
|
|
388
|
+
|
|
389
|
+
type mcp_tool_approval_filter =
|
|
390
|
+
{
|
|
391
|
+
?always: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always,
|
|
392
|
+
?never: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
class McpToolApprovalFilter < OpenAI::Internal::Type::BaseModel
|
|
396
|
+
# A filter object to specify which tools are allowed.
|
|
397
|
+
attr_reader always: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always?
|
|
398
|
+
|
|
399
|
+
# A filter object to specify which tools are allowed.
|
|
400
|
+
def always=: (
|
|
401
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always
|
|
402
|
+
) -> OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always
|
|
403
|
+
|
|
404
|
+
# A filter object to specify which tools are allowed.
|
|
405
|
+
attr_reader never: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never?
|
|
406
|
+
|
|
407
|
+
# A filter object to specify which tools are allowed.
|
|
408
|
+
def never=: (
|
|
409
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
|
410
|
+
) -> OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
|
411
|
+
|
|
412
|
+
# @param always
|
|
413
|
+
# A filter object to specify which tools are allowed.
|
|
414
|
+
# @param never
|
|
415
|
+
# A filter object to specify which tools are allowed.
|
|
416
|
+
def initialize: (
|
|
417
|
+
?always: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always,
|
|
418
|
+
?never: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
|
419
|
+
) -> void
|
|
420
|
+
|
|
421
|
+
def to_hash: -> {
|
|
422
|
+
?always: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Always,
|
|
423
|
+
?never: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::McpToolApprovalFilter::Never
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
type always = { ?read_only: bool, ?tool_names: ::Array[String] }
|
|
427
|
+
|
|
428
|
+
class Always < OpenAI::Internal::Type::BaseModel
|
|
429
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
430
|
+
# is
|
|
431
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
432
|
+
# it will match this filter.
|
|
433
|
+
attr_reader read_only: bool?
|
|
434
|
+
|
|
435
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
436
|
+
# is
|
|
437
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
438
|
+
# it will match this filter.
|
|
439
|
+
def read_only=: (bool) -> bool
|
|
440
|
+
|
|
441
|
+
# List of allowed tool names.
|
|
442
|
+
attr_reader tool_names: ::Array[String]?
|
|
443
|
+
|
|
444
|
+
# List of allowed tool names.
|
|
445
|
+
def tool_names=: (::Array[String]) -> ::Array[String]
|
|
446
|
+
|
|
447
|
+
# @param read_only
|
|
448
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
449
|
+
# is
|
|
450
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
451
|
+
# it will match this filter.
|
|
452
|
+
# @param tool_names
|
|
453
|
+
# List of allowed tool names.
|
|
454
|
+
def initialize: (
|
|
455
|
+
?read_only: bool,
|
|
456
|
+
?tool_names: ::Array[String]
|
|
457
|
+
) -> void
|
|
458
|
+
|
|
459
|
+
def to_hash: -> {
|
|
460
|
+
?read_only: bool,
|
|
461
|
+
?tool_names: ::Array[String]
|
|
462
|
+
}
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
type never = { ?read_only: bool, ?tool_names: ::Array[String] }
|
|
466
|
+
|
|
467
|
+
class Never < OpenAI::Internal::Type::BaseModel
|
|
468
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
469
|
+
# is
|
|
470
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
471
|
+
# it will match this filter.
|
|
472
|
+
attr_reader read_only: bool?
|
|
473
|
+
|
|
474
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
475
|
+
# is
|
|
476
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
477
|
+
# it will match this filter.
|
|
478
|
+
def read_only=: (bool) -> bool
|
|
479
|
+
|
|
480
|
+
# List of allowed tool names.
|
|
481
|
+
attr_reader tool_names: ::Array[String]?
|
|
482
|
+
|
|
483
|
+
# List of allowed tool names.
|
|
484
|
+
def tool_names=: (::Array[String]) -> ::Array[String]
|
|
485
|
+
|
|
486
|
+
# @param read_only
|
|
487
|
+
# Indicates whether or not a tool modifies data or is read-only. If an MCP server
|
|
488
|
+
# is
|
|
489
|
+
# [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
490
|
+
# it will match this filter.
|
|
491
|
+
# @param tool_names
|
|
492
|
+
# List of allowed tool names.
|
|
493
|
+
def initialize: (
|
|
494
|
+
?read_only: bool,
|
|
495
|
+
?tool_names: ::Array[String]
|
|
496
|
+
) -> void
|
|
497
|
+
|
|
498
|
+
def to_hash: -> {
|
|
499
|
+
?read_only: bool,
|
|
500
|
+
?tool_names: ::Array[String]
|
|
501
|
+
}
|
|
502
|
+
end
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
type mcp_tool_approval_setting = :always | :never
|
|
506
|
+
|
|
507
|
+
module McpToolApprovalSetting
|
|
508
|
+
extend OpenAI::Internal::Type::Enum
|
|
509
|
+
|
|
510
|
+
ALWAYS: :always
|
|
511
|
+
NEVER: :never
|
|
512
|
+
|
|
513
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::RequireApproval::mcp_tool_approval_setting]
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::Mcp::require_approval]
|
|
517
|
+
end
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
type code_interpreter =
|
|
521
|
+
{
|
|
522
|
+
container: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::container,
|
|
523
|
+
?type: :code_interpreter,
|
|
524
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::allowed_caller]?
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
class CodeInterpreter < OpenAI::Internal::Type::BaseModel
|
|
528
|
+
# The code interpreter container. Can be a container ID or an object that
|
|
529
|
+
# specifies uploaded file IDs to make available to your code, along with an
|
|
530
|
+
# optional `memory_limit` setting.
|
|
531
|
+
attr_accessor container: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::container
|
|
532
|
+
|
|
533
|
+
# The type of the code interpreter tool. Always `code_interpreter`.
|
|
534
|
+
attr_accessor type: :code_interpreter
|
|
535
|
+
|
|
536
|
+
# The tool invocation context(s).
|
|
537
|
+
attr_accessor allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::allowed_caller]?
|
|
538
|
+
|
|
539
|
+
# @param container
|
|
540
|
+
# The code interpreter container. Can be a container ID or an object that
|
|
541
|
+
# specifies uploaded file IDs to make available to your code, along with an
|
|
542
|
+
# optional `memory_limit` setting.
|
|
543
|
+
# @param allowed_callers
|
|
544
|
+
# The tool invocation context(s).
|
|
545
|
+
# @param type
|
|
546
|
+
# The type of the code interpreter tool. Always `code_interpreter`.
|
|
547
|
+
def initialize: (
|
|
548
|
+
container: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::container,
|
|
549
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::allowed_caller]?,
|
|
550
|
+
?type: :code_interpreter
|
|
551
|
+
) -> void
|
|
552
|
+
|
|
553
|
+
def to_hash: -> {
|
|
554
|
+
container: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::container,
|
|
555
|
+
?type: :code_interpreter,
|
|
556
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::allowed_caller]?
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
type container =
|
|
560
|
+
String
|
|
561
|
+
| OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto
|
|
562
|
+
|
|
563
|
+
module Container
|
|
564
|
+
extend OpenAI::Internal::Type::Union
|
|
565
|
+
|
|
566
|
+
type code_interpreter_tool_auto =
|
|
567
|
+
{
|
|
568
|
+
?type: :auto,
|
|
569
|
+
?file_ids: ::Array[String],
|
|
570
|
+
?memory_limit: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::memory_limit?,
|
|
571
|
+
?network_policy: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::network_policy
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
class CodeInterpreterToolAuto < OpenAI::Internal::Type::BaseModel
|
|
575
|
+
# Always `auto`.
|
|
576
|
+
attr_accessor type: :auto
|
|
577
|
+
|
|
578
|
+
# An optional list of uploaded files to make available to your code.
|
|
579
|
+
attr_reader file_ids: ::Array[String]?
|
|
580
|
+
|
|
581
|
+
# An optional list of uploaded files to make available to your code.
|
|
582
|
+
def file_ids=: (::Array[String]) -> ::Array[String]
|
|
583
|
+
|
|
584
|
+
# The memory limit for the code interpreter container.
|
|
585
|
+
attr_accessor memory_limit: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::memory_limit?
|
|
586
|
+
|
|
587
|
+
# Network access policy for the container.
|
|
588
|
+
attr_reader network_policy: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::network_policy?
|
|
589
|
+
|
|
590
|
+
# Network access policy for the container.
|
|
591
|
+
def network_policy=: (
|
|
592
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::network_policy
|
|
593
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::network_policy
|
|
594
|
+
|
|
595
|
+
# @param file_ids
|
|
596
|
+
# An optional list of uploaded files to make available to your code.
|
|
597
|
+
# @param memory_limit
|
|
598
|
+
# The memory limit for the code interpreter container.
|
|
599
|
+
# @param network_policy
|
|
600
|
+
# Network access policy for the container.
|
|
601
|
+
# @param type
|
|
602
|
+
# Always `auto`.
|
|
603
|
+
def initialize: (
|
|
604
|
+
?file_ids: ::Array[String],
|
|
605
|
+
?memory_limit: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::memory_limit?,
|
|
606
|
+
?network_policy: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::network_policy,
|
|
607
|
+
?type: :auto
|
|
608
|
+
) -> void
|
|
609
|
+
|
|
610
|
+
def to_hash: -> {
|
|
611
|
+
?type: :auto,
|
|
612
|
+
?file_ids: ::Array[String],
|
|
613
|
+
?memory_limit: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::memory_limit?,
|
|
614
|
+
?network_policy: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::network_policy
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
type memory_limit = :"1g" | :"4g" | :"16g" | :"64g"
|
|
618
|
+
|
|
619
|
+
module MemoryLimit
|
|
620
|
+
extend OpenAI::Internal::Type::Enum
|
|
621
|
+
|
|
622
|
+
MEMORY_LIMIT_1G: :"1g"
|
|
623
|
+
MEMORY_LIMIT_4G: :"4g"
|
|
624
|
+
MEMORY_LIMIT_16G: :"16g"
|
|
625
|
+
MEMORY_LIMIT_64G: :"64g"
|
|
626
|
+
|
|
627
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::memory_limit]
|
|
628
|
+
end
|
|
629
|
+
|
|
630
|
+
type network_policy =
|
|
631
|
+
OpenAI::Beta::BetaContainerNetworkPolicyDisabled
|
|
632
|
+
| OpenAI::Beta::BetaContainerNetworkPolicyAllowlist
|
|
633
|
+
|
|
634
|
+
module NetworkPolicy
|
|
635
|
+
extend OpenAI::Internal::Type::Union
|
|
636
|
+
|
|
637
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::Container::CodeInterpreterToolAuto::network_policy]
|
|
638
|
+
end
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::container]
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
type allowed_caller = :direct | :programmatic
|
|
645
|
+
|
|
646
|
+
module AllowedCaller
|
|
647
|
+
extend OpenAI::Internal::Type::Enum
|
|
648
|
+
|
|
649
|
+
DIRECT: :direct
|
|
650
|
+
PROGRAMMATIC: :programmatic
|
|
651
|
+
|
|
652
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::CodeInterpreter::allowed_caller]
|
|
653
|
+
end
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
type programmatic_tool_calling = { ?type: :programmatic_tool_calling }
|
|
657
|
+
|
|
658
|
+
class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
|
|
659
|
+
# The type of the tool. Always `programmatic_tool_calling`.
|
|
660
|
+
attr_accessor type: :programmatic_tool_calling
|
|
661
|
+
|
|
662
|
+
# @param type
|
|
663
|
+
# The type of the tool. Always `programmatic_tool_calling`.
|
|
664
|
+
def initialize: (?type: :programmatic_tool_calling) -> void
|
|
665
|
+
|
|
666
|
+
def to_hash: -> { ?type: :programmatic_tool_calling }
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
type image_generation =
|
|
670
|
+
{
|
|
671
|
+
?type: :image_generation,
|
|
672
|
+
?action: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::action,
|
|
673
|
+
?background: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::background,
|
|
674
|
+
?input_fidelity: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::input_fidelity?,
|
|
675
|
+
?input_image_mask: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputImageMask,
|
|
676
|
+
?model: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::model,
|
|
677
|
+
?moderation: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::moderation,
|
|
678
|
+
?output_compression: Integer,
|
|
679
|
+
?output_format: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::output_format,
|
|
680
|
+
?partial_images: Integer,
|
|
681
|
+
?quality: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::quality,
|
|
682
|
+
?size: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::size
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
class ImageGeneration < OpenAI::Internal::Type::BaseModel
|
|
686
|
+
# The type of the image generation tool. Always `image_generation`.
|
|
687
|
+
attr_accessor type: :image_generation
|
|
688
|
+
|
|
689
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
690
|
+
attr_reader action: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::action?
|
|
691
|
+
|
|
692
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
693
|
+
def action=: (
|
|
694
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::action
|
|
695
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::action
|
|
696
|
+
|
|
697
|
+
# Allows to set transparency for the background of the generated image(s). Must be
|
|
698
|
+
# one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
699
|
+
# the model will automatically determine the best background for the image.
|
|
700
|
+
#
|
|
701
|
+
# `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
702
|
+
# snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
703
|
+
# backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
704
|
+
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
705
|
+
# set the output format to `png` or `webp`.
|
|
706
|
+
attr_reader background: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::background?
|
|
707
|
+
|
|
708
|
+
# Allows to set transparency for the background of the generated image(s). Must be
|
|
709
|
+
# one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
710
|
+
# the model will automatically determine the best background for the image.
|
|
711
|
+
#
|
|
712
|
+
# `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
713
|
+
# snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
714
|
+
# backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
715
|
+
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
716
|
+
# set the output format to `png` or `webp`.
|
|
717
|
+
def background=: (
|
|
718
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::background
|
|
719
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::background
|
|
720
|
+
|
|
721
|
+
# Control how much effort the model will exert to match the style and features,
|
|
722
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
723
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
724
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
725
|
+
attr_accessor input_fidelity: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::input_fidelity?
|
|
726
|
+
|
|
727
|
+
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
728
|
+
# `file_id` (string, optional).
|
|
729
|
+
attr_reader input_image_mask: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputImageMask?
|
|
730
|
+
|
|
731
|
+
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
732
|
+
# `file_id` (string, optional).
|
|
733
|
+
def input_image_mask=: (
|
|
734
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputImageMask
|
|
735
|
+
) -> OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputImageMask
|
|
736
|
+
|
|
737
|
+
# The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
|
|
738
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
739
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
740
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
741
|
+
# `chatgpt-image-latest`. Default: `gpt-image-1`.
|
|
742
|
+
attr_reader model: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::model?
|
|
743
|
+
|
|
744
|
+
# The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
|
|
745
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
746
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
747
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
748
|
+
# `chatgpt-image-latest`. Default: `gpt-image-1`.
|
|
749
|
+
def model=: (
|
|
750
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::model
|
|
751
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::model
|
|
752
|
+
|
|
753
|
+
# Moderation level for the generated image. Default: `auto`.
|
|
754
|
+
attr_reader moderation: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::moderation?
|
|
755
|
+
|
|
756
|
+
# Moderation level for the generated image. Default: `auto`.
|
|
757
|
+
def moderation=: (
|
|
758
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::moderation
|
|
759
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::moderation
|
|
760
|
+
|
|
761
|
+
# Compression level for the output image. Default: 100.
|
|
762
|
+
attr_reader output_compression: Integer?
|
|
763
|
+
|
|
764
|
+
# Compression level for the output image. Default: 100.
|
|
765
|
+
def output_compression=: (Integer) -> Integer
|
|
766
|
+
|
|
767
|
+
# The output format of the generated image. One of `png`, `webp`, or `jpeg`.
|
|
768
|
+
# Default: `png`.
|
|
769
|
+
attr_reader output_format: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::output_format?
|
|
770
|
+
|
|
771
|
+
# The output format of the generated image. One of `png`, `webp`, or `jpeg`.
|
|
772
|
+
# Default: `png`.
|
|
773
|
+
def output_format=: (
|
|
774
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::output_format
|
|
775
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::output_format
|
|
776
|
+
|
|
777
|
+
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
778
|
+
# to 3.
|
|
779
|
+
attr_reader partial_images: Integer?
|
|
780
|
+
|
|
781
|
+
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
782
|
+
# to 3.
|
|
783
|
+
def partial_images=: (Integer) -> Integer
|
|
784
|
+
|
|
785
|
+
# The quality of the generated image. The GPT image models support `low`,
|
|
786
|
+
# `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
|
|
787
|
+
# including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
|
|
788
|
+
# `auto`.
|
|
789
|
+
attr_reader quality: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::quality?
|
|
790
|
+
|
|
791
|
+
# The quality of the generated image. The GPT image models support `low`,
|
|
792
|
+
# `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
|
|
793
|
+
# including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
|
|
794
|
+
# `auto`.
|
|
795
|
+
def quality=: (
|
|
796
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::quality
|
|
797
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::quality
|
|
798
|
+
|
|
799
|
+
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
800
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
801
|
+
# `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
802
|
+
# resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
803
|
+
# Width and height must both be divisible by 16 and the requested aspect ratio
|
|
804
|
+
# must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
805
|
+
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
806
|
+
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
807
|
+
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
808
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
809
|
+
attr_reader size: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::size?
|
|
810
|
+
|
|
811
|
+
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
812
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
813
|
+
# `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
814
|
+
# resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
815
|
+
# Width and height must both be divisible by 16 and the requested aspect ratio
|
|
816
|
+
# must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
817
|
+
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
818
|
+
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
819
|
+
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
820
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
821
|
+
def size=: (
|
|
822
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::size
|
|
823
|
+
) -> OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::size
|
|
824
|
+
|
|
825
|
+
# @param action
|
|
826
|
+
# Whether to generate a new image or edit an existing image. Default: `auto`.
|
|
827
|
+
# @param background
|
|
828
|
+
# Allows to set transparency for the background of the generated image(s). Must be
|
|
829
|
+
# one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
830
|
+
# the model will automatically determine the best background for the image.
|
|
831
|
+
#
|
|
832
|
+
# `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
833
|
+
# snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
834
|
+
# backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
835
|
+
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
836
|
+
# set the output format to `png` or `webp`.
|
|
837
|
+
# @param input_fidelity
|
|
838
|
+
# Control how much effort the model will exert to match the style and features,
|
|
839
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
840
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
841
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
842
|
+
# @param input_image_mask
|
|
843
|
+
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
844
|
+
# `file_id` (string, optional).
|
|
845
|
+
# @param model
|
|
846
|
+
# The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
|
|
847
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
848
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
849
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
850
|
+
# `chatgpt-image-latest`. Default: `gpt-image-1`.
|
|
851
|
+
# @param moderation
|
|
852
|
+
# Moderation level for the generated image. Default: `auto`.
|
|
853
|
+
# @param output_compression
|
|
854
|
+
# Compression level for the output image. Default: 100.
|
|
855
|
+
# @param output_format
|
|
856
|
+
# The output format of the generated image. One of `png`, `webp`, or `jpeg`.
|
|
857
|
+
# Default: `png`.
|
|
858
|
+
# @param partial_images
|
|
859
|
+
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
860
|
+
# to 3.
|
|
861
|
+
# @param quality
|
|
862
|
+
# The quality of the generated image. The GPT image models support `low`,
|
|
863
|
+
# `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
|
|
864
|
+
# including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
|
|
865
|
+
# `auto`.
|
|
866
|
+
# @param size
|
|
867
|
+
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
868
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
869
|
+
# `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
870
|
+
# resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
871
|
+
# Width and height must both be divisible by 16 and the requested aspect ratio
|
|
872
|
+
# must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
873
|
+
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
874
|
+
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
875
|
+
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
876
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
877
|
+
# @param type
|
|
878
|
+
# The type of the image generation tool. Always `image_generation`.
|
|
879
|
+
def initialize: (
|
|
880
|
+
?action: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::action,
|
|
881
|
+
?background: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::background,
|
|
882
|
+
?input_fidelity: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::input_fidelity?,
|
|
883
|
+
?input_image_mask: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputImageMask,
|
|
884
|
+
?model: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::model,
|
|
885
|
+
?moderation: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::moderation,
|
|
886
|
+
?output_compression: Integer,
|
|
887
|
+
?output_format: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::output_format,
|
|
888
|
+
?partial_images: Integer,
|
|
889
|
+
?quality: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::quality,
|
|
890
|
+
?size: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::size,
|
|
891
|
+
?type: :image_generation
|
|
892
|
+
) -> void
|
|
893
|
+
|
|
894
|
+
def to_hash: -> {
|
|
895
|
+
?type: :image_generation,
|
|
896
|
+
?action: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::action,
|
|
897
|
+
?background: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::background,
|
|
898
|
+
?input_fidelity: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::input_fidelity?,
|
|
899
|
+
?input_image_mask: OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputImageMask,
|
|
900
|
+
?model: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::model,
|
|
901
|
+
?moderation: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::moderation,
|
|
902
|
+
?output_compression: Integer,
|
|
903
|
+
?output_format: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::output_format,
|
|
904
|
+
?partial_images: Integer,
|
|
905
|
+
?quality: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::quality,
|
|
906
|
+
?size: OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::size
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
type action = :generate | :edit | :auto
|
|
910
|
+
|
|
911
|
+
module Action
|
|
912
|
+
extend OpenAI::Internal::Type::Enum
|
|
913
|
+
|
|
914
|
+
GENERATE: :generate
|
|
915
|
+
EDIT: :edit
|
|
916
|
+
AUTO: :auto
|
|
917
|
+
|
|
918
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::action]
|
|
919
|
+
end
|
|
920
|
+
|
|
921
|
+
type background = :transparent | :opaque | :auto
|
|
922
|
+
|
|
923
|
+
module Background
|
|
924
|
+
extend OpenAI::Internal::Type::Enum
|
|
925
|
+
|
|
926
|
+
TRANSPARENT: :transparent
|
|
927
|
+
OPAQUE: :opaque
|
|
928
|
+
AUTO: :auto
|
|
929
|
+
|
|
930
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::background]
|
|
931
|
+
end
|
|
932
|
+
|
|
933
|
+
type input_fidelity = :high | :low
|
|
934
|
+
|
|
935
|
+
module InputFidelity
|
|
936
|
+
extend OpenAI::Internal::Type::Enum
|
|
937
|
+
|
|
938
|
+
HIGH: :high
|
|
939
|
+
LOW: :low
|
|
940
|
+
|
|
941
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::input_fidelity]
|
|
942
|
+
end
|
|
943
|
+
|
|
944
|
+
type input_image_mask = { ?file_id: String, ?image_url: String }
|
|
945
|
+
|
|
946
|
+
class InputImageMask < OpenAI::Internal::Type::BaseModel
|
|
947
|
+
# File ID for the mask image.
|
|
948
|
+
attr_reader file_id: String?
|
|
949
|
+
|
|
950
|
+
# File ID for the mask image.
|
|
951
|
+
def file_id=: (String) -> String
|
|
952
|
+
|
|
953
|
+
# Base64-encoded mask image.
|
|
954
|
+
attr_reader image_url: String?
|
|
955
|
+
|
|
956
|
+
# Base64-encoded mask image.
|
|
957
|
+
def image_url=: (String) -> String
|
|
958
|
+
|
|
959
|
+
# @param file_id
|
|
960
|
+
# File ID for the mask image.
|
|
961
|
+
# @param image_url
|
|
962
|
+
# Base64-encoded mask image.
|
|
963
|
+
def initialize: (?file_id: String, ?image_url: String) -> void
|
|
964
|
+
|
|
965
|
+
def to_hash: -> { ?file_id: String, ?image_url: String }
|
|
966
|
+
end
|
|
967
|
+
|
|
968
|
+
type model =
|
|
969
|
+
String
|
|
970
|
+
| :"gpt-image-1"
|
|
971
|
+
| :"gpt-image-1-mini"
|
|
972
|
+
| :"gpt-image-2"
|
|
973
|
+
| :"gpt-image-2-2026-04-21"
|
|
974
|
+
| :"gpt-image-2.5-sunburst"
|
|
975
|
+
| :"gpt-image-2.5-sunburst-2026-09-08"
|
|
976
|
+
| :"gpt-image-2.5-flare"
|
|
977
|
+
| :"gpt-image-2.5-flare-2026-09-08"
|
|
978
|
+
| :"gpt-image-1.5"
|
|
979
|
+
| :"chatgpt-image-latest"
|
|
980
|
+
|
|
981
|
+
module Model
|
|
982
|
+
extend OpenAI::Internal::Type::Union
|
|
983
|
+
|
|
984
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::model]
|
|
985
|
+
|
|
986
|
+
GPT_IMAGE_1: :"gpt-image-1"
|
|
987
|
+
GPT_IMAGE_1_MINI: :"gpt-image-1-mini"
|
|
988
|
+
GPT_IMAGE_2: :"gpt-image-2"
|
|
989
|
+
GPT_IMAGE_2_2026_04_21: :"gpt-image-2-2026-04-21"
|
|
990
|
+
GPT_IMAGE_2_5_SUNBURST: :"gpt-image-2.5-sunburst"
|
|
991
|
+
GPT_IMAGE_2_5_SUNBURST_2026_09_08: :"gpt-image-2.5-sunburst-2026-09-08"
|
|
992
|
+
GPT_IMAGE_2_5_FLARE: :"gpt-image-2.5-flare"
|
|
993
|
+
GPT_IMAGE_2_5_FLARE_2026_09_08: :"gpt-image-2.5-flare-2026-09-08"
|
|
994
|
+
GPT_IMAGE_1_5: :"gpt-image-1.5"
|
|
995
|
+
CHATGPT_IMAGE_LATEST: :"chatgpt-image-latest"
|
|
996
|
+
end
|
|
997
|
+
|
|
998
|
+
type moderation = :auto | :low
|
|
999
|
+
|
|
1000
|
+
module Moderation
|
|
1001
|
+
extend OpenAI::Internal::Type::Enum
|
|
1002
|
+
|
|
1003
|
+
AUTO: :auto
|
|
1004
|
+
LOW: :low
|
|
1005
|
+
|
|
1006
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::moderation]
|
|
1007
|
+
end
|
|
1008
|
+
|
|
1009
|
+
type output_format = :png | :webp | :jpeg
|
|
1010
|
+
|
|
1011
|
+
module OutputFormat
|
|
1012
|
+
extend OpenAI::Internal::Type::Enum
|
|
1013
|
+
|
|
1014
|
+
PNG: :png
|
|
1015
|
+
WEBP: :webp
|
|
1016
|
+
JPEG: :jpeg
|
|
1017
|
+
|
|
1018
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::output_format]
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
type quality = :low | :medium | :high | :xhigh | :max | :auto
|
|
1022
|
+
|
|
1023
|
+
module Quality
|
|
1024
|
+
extend OpenAI::Internal::Type::Enum
|
|
1025
|
+
|
|
1026
|
+
LOW: :low
|
|
1027
|
+
MEDIUM: :medium
|
|
1028
|
+
HIGH: :high
|
|
1029
|
+
XHIGH: :xhigh
|
|
1030
|
+
MAX: :max
|
|
1031
|
+
AUTO: :auto
|
|
1032
|
+
|
|
1033
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::quality]
|
|
1034
|
+
end
|
|
1035
|
+
|
|
1036
|
+
type size =
|
|
1037
|
+
String | :"1024x1024" | :"1024x1536" | :"1536x1024" | :auto
|
|
1038
|
+
|
|
1039
|
+
module Size
|
|
1040
|
+
extend OpenAI::Internal::Type::Union
|
|
1041
|
+
|
|
1042
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::size]
|
|
1043
|
+
|
|
1044
|
+
SIZE_1024X1024: :"1024x1024"
|
|
1045
|
+
SIZE_1024X1536: :"1024x1536"
|
|
1046
|
+
SIZE_1536X1024: :"1536x1024"
|
|
1047
|
+
AUTO: :auto
|
|
1048
|
+
end
|
|
1049
|
+
end
|
|
1050
|
+
|
|
1051
|
+
type local_shell = { ?type: :local_shell }
|
|
1052
|
+
|
|
1053
|
+
class LocalShell < OpenAI::Internal::Type::BaseModel
|
|
1054
|
+
# The type of the local shell tool. Always `local_shell`.
|
|
1055
|
+
attr_accessor type: :local_shell
|
|
1056
|
+
|
|
1057
|
+
# @param type
|
|
1058
|
+
# The type of the local shell tool. Always `local_shell`.
|
|
1059
|
+
def initialize: (?type: :local_shell) -> void
|
|
1060
|
+
|
|
1061
|
+
def to_hash: -> { ?type: :local_shell }
|
|
1062
|
+
end
|
|
1063
|
+
|
|
1064
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::tool]
|
|
1065
|
+
end
|
|
1066
|
+
|
|
78
1067
|
type agent = { agent_name: String }
|
|
79
1068
|
|
|
80
1069
|
class Agent < OpenAI::Internal::Type::BaseModel
|