openai 0.79.0 → 0.80.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 +19 -0
- data/README.md +1 -1
- data/bedrock.md +67 -2
- data/lib/openai/models/all_models.rb +2 -0
- data/lib/openai/models/beta/beta_mcp_tool_call_error.rb +84 -0
- data/lib/openai/models/beta/beta_response.rb +18 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item_added_event.rb +5 -2
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/beta/beta_response_reasoning_item.rb +5 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +18 -0
- data/lib/openai/models/beta/beta_responses_server_event.rb +126 -22
- data/lib/openai/models/beta/beta_web_search_tool.rb +11 -1
- data/lib/openai/models/beta/response_compact_params.rb +9 -0
- data/lib/openai/models/beta/response_create_params.rb +18 -0
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/completion_usage.rb +26 -2
- data/lib/openai/models/conversations/conversation_item.rb +3 -3
- data/lib/openai/models/model.rb +9 -1
- data/lib/openai/models/responses/mcp_tool_call_error.rb +82 -0
- data/lib/openai/models/responses/response.rb +9 -0
- data/lib/openai/models/responses/response_compact_params.rb +9 -0
- data/lib/openai/models/responses/response_create_params.rb +9 -0
- data/lib/openai/models/responses/response_input_item.rb +3 -3
- data/lib/openai/models/responses/response_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item_added_event.rb +5 -2
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/responses/response_reasoning_item.rb +5 -0
- data/lib/openai/models/responses/responses_client_event.rb +9 -0
- data/lib/openai/models/responses/responses_server_event.rb +100 -22
- data/lib/openai/models/responses/web_search_tool.rb +11 -1
- data/lib/openai/models/responses_model.rb +2 -0
- data/lib/openai/providers/bedrock.rb +127 -16
- data/lib/openai/resources/files.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -2
- data/rbi/openai/models/all_models.rbi +10 -0
- data/rbi/openai/models/beta/beta_mcp_tool_call_error.rbi +122 -0
- data/rbi/openai/models/beta/beta_response.rbi +32 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/beta/beta_response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +32 -0
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +221 -67
- data/rbi/openai/models/beta/beta_web_search_tool.rbi +15 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +15 -0
- data/rbi/openai/models/beta/response_create_params.rbi +32 -0
- data/rbi/openai/models/chat_model.rbi +2 -0
- data/rbi/openai/models/completion_usage.rbi +39 -6
- data/rbi/openai/models/conversations/conversation_item.rbi +12 -3
- data/rbi/openai/models/model.rbi +14 -1
- data/rbi/openai/models/responses/mcp_tool_call_error.rbi +120 -0
- data/rbi/openai/models/responses/response.rbi +17 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +15 -0
- data/rbi/openai/models/responses/response_create_params.rbi +17 -0
- data/rbi/openai/models/responses/response_input_item.rbi +27 -3
- data/rbi/openai/models/responses/response_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/responses/response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +17 -0
- data/rbi/openai/models/responses/responses_server_event.rbi +165 -62
- data/rbi/openai/models/responses/web_search_tool.rbi +15 -0
- data/rbi/openai/models/responses_model.rbi +10 -0
- data/rbi/openai/providers.rbi +2 -0
- data/rbi/openai/resources/beta/responses.rbi +8 -0
- data/rbi/openai/resources/files.rbi +1 -1
- data/rbi/openai/resources/responses.rbi +8 -0
- data/sig/openai/models/all_models.rbs +4 -0
- data/sig/openai/models/beta/beta_mcp_tool_call_error.rbs +75 -0
- data/sig/openai/models/beta/beta_response.rbs +8 -1
- data/sig/openai/models/beta/beta_response_input_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +8 -1
- data/sig/openai/models/beta/beta_responses_server_event.rbs +99 -39
- data/sig/openai/models/beta/beta_web_search_tool.rbs +7 -0
- data/sig/openai/models/beta/response_compact_params.rbs +6 -0
- data/sig/openai/models/beta/response_create_params.rbs +8 -1
- data/sig/openai/models/chat_model.rbs +2 -0
- data/sig/openai/models/completion_usage.rbs +27 -6
- data/sig/openai/models/conversations/conversation_item.rbs +4 -4
- data/sig/openai/models/model.rbs +12 -2
- data/sig/openai/models/responses/mcp_tool_call_error.rbs +73 -0
- data/sig/openai/models/responses/response.rbs +2 -1
- data/sig/openai/models/responses/response_compact_params.rbs +6 -0
- data/sig/openai/models/responses/response_create_params.rbs +2 -1
- data/sig/openai/models/responses/response_input_item.rbs +4 -4
- data/sig/openai/models/responses/response_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/responses/responses_client_event.rbs +2 -1
- data/sig/openai/models/responses/responses_server_event.rbs +84 -36
- data/sig/openai/models/responses/web_search_tool.rbs +7 -0
- data/sig/openai/models/responses_model.rbs +4 -0
- data/sig/openai/providers.rbs +1 -0
- metadata +7 -1
|
@@ -12,8 +12,14 @@ module OpenAI
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
sig
|
|
15
|
+
# An annotation that applies to a span of output text.
|
|
16
|
+
sig do
|
|
17
|
+
returns(
|
|
18
|
+
T.nilable(
|
|
19
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::Variants
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
end
|
|
17
23
|
attr_accessor :annotation
|
|
18
24
|
|
|
19
25
|
# The index of the annotation within the content part.
|
|
@@ -43,7 +49,15 @@ module OpenAI
|
|
|
43
49
|
# Emitted when an annotation is added to output text content.
|
|
44
50
|
sig do
|
|
45
51
|
params(
|
|
46
|
-
annotation:
|
|
52
|
+
annotation:
|
|
53
|
+
T.nilable(
|
|
54
|
+
T.any(
|
|
55
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation::OrHash,
|
|
56
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation::OrHash,
|
|
57
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation::OrHash,
|
|
58
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath::OrHash
|
|
59
|
+
)
|
|
60
|
+
),
|
|
47
61
|
annotation_index: Integer,
|
|
48
62
|
content_index: Integer,
|
|
49
63
|
item_id: String,
|
|
@@ -53,7 +67,7 @@ module OpenAI
|
|
|
53
67
|
).returns(T.attached_class)
|
|
54
68
|
end
|
|
55
69
|
def self.new(
|
|
56
|
-
#
|
|
70
|
+
# An annotation that applies to a span of output text.
|
|
57
71
|
annotation:,
|
|
58
72
|
# The index of the annotation within the content part.
|
|
59
73
|
annotation_index:,
|
|
@@ -73,7 +87,10 @@ module OpenAI
|
|
|
73
87
|
sig do
|
|
74
88
|
override.returns(
|
|
75
89
|
{
|
|
76
|
-
annotation:
|
|
90
|
+
annotation:
|
|
91
|
+
T.nilable(
|
|
92
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::Variants
|
|
93
|
+
),
|
|
77
94
|
annotation_index: Integer,
|
|
78
95
|
content_index: Integer,
|
|
79
96
|
item_id: String,
|
|
@@ -85,6 +102,281 @@ module OpenAI
|
|
|
85
102
|
end
|
|
86
103
|
def to_hash
|
|
87
104
|
end
|
|
105
|
+
|
|
106
|
+
# An annotation that applies to a span of output text.
|
|
107
|
+
module Annotation
|
|
108
|
+
extend OpenAI::Internal::Type::Union
|
|
109
|
+
|
|
110
|
+
Variants =
|
|
111
|
+
T.type_alias do
|
|
112
|
+
T.any(
|
|
113
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation,
|
|
114
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation,
|
|
115
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation,
|
|
116
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
class FileCitation < OpenAI::Internal::Type::BaseModel
|
|
121
|
+
OrHash =
|
|
122
|
+
T.type_alias do
|
|
123
|
+
T.any(
|
|
124
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation,
|
|
125
|
+
OpenAI::Internal::AnyHash
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# The ID of the file.
|
|
130
|
+
sig { returns(String) }
|
|
131
|
+
attr_accessor :file_id
|
|
132
|
+
|
|
133
|
+
# The filename of the file cited.
|
|
134
|
+
sig { returns(String) }
|
|
135
|
+
attr_accessor :filename
|
|
136
|
+
|
|
137
|
+
# The index of the file in the list of files.
|
|
138
|
+
sig { returns(Integer) }
|
|
139
|
+
attr_accessor :index
|
|
140
|
+
|
|
141
|
+
# The type of the file citation. Always `file_citation`.
|
|
142
|
+
sig { returns(Symbol) }
|
|
143
|
+
attr_accessor :type
|
|
144
|
+
|
|
145
|
+
# A citation to a file.
|
|
146
|
+
sig do
|
|
147
|
+
params(
|
|
148
|
+
file_id: String,
|
|
149
|
+
filename: String,
|
|
150
|
+
index: Integer,
|
|
151
|
+
type: Symbol
|
|
152
|
+
).returns(T.attached_class)
|
|
153
|
+
end
|
|
154
|
+
def self.new(
|
|
155
|
+
# The ID of the file.
|
|
156
|
+
file_id:,
|
|
157
|
+
# The filename of the file cited.
|
|
158
|
+
filename:,
|
|
159
|
+
# The index of the file in the list of files.
|
|
160
|
+
index:,
|
|
161
|
+
# The type of the file citation. Always `file_citation`.
|
|
162
|
+
type: :file_citation
|
|
163
|
+
)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
sig do
|
|
167
|
+
override.returns(
|
|
168
|
+
{
|
|
169
|
+
file_id: String,
|
|
170
|
+
filename: String,
|
|
171
|
+
index: Integer,
|
|
172
|
+
type: Symbol
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
def to_hash
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
class URLCitation < OpenAI::Internal::Type::BaseModel
|
|
181
|
+
OrHash =
|
|
182
|
+
T.type_alias do
|
|
183
|
+
T.any(
|
|
184
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation,
|
|
185
|
+
OpenAI::Internal::AnyHash
|
|
186
|
+
)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# The index of the last character of the URL citation in the message.
|
|
190
|
+
sig { returns(Integer) }
|
|
191
|
+
attr_accessor :end_index
|
|
192
|
+
|
|
193
|
+
# The index of the first character of the URL citation in the message.
|
|
194
|
+
sig { returns(Integer) }
|
|
195
|
+
attr_accessor :start_index
|
|
196
|
+
|
|
197
|
+
# The title of the web resource.
|
|
198
|
+
sig { returns(String) }
|
|
199
|
+
attr_accessor :title
|
|
200
|
+
|
|
201
|
+
# The type of the URL citation. Always `url_citation`.
|
|
202
|
+
sig { returns(Symbol) }
|
|
203
|
+
attr_accessor :type
|
|
204
|
+
|
|
205
|
+
# The URL of the web resource.
|
|
206
|
+
sig { returns(String) }
|
|
207
|
+
attr_accessor :url
|
|
208
|
+
|
|
209
|
+
# A citation for a web resource used to generate a model response.
|
|
210
|
+
sig do
|
|
211
|
+
params(
|
|
212
|
+
end_index: Integer,
|
|
213
|
+
start_index: Integer,
|
|
214
|
+
title: String,
|
|
215
|
+
url: String,
|
|
216
|
+
type: Symbol
|
|
217
|
+
).returns(T.attached_class)
|
|
218
|
+
end
|
|
219
|
+
def self.new(
|
|
220
|
+
# The index of the last character of the URL citation in the message.
|
|
221
|
+
end_index:,
|
|
222
|
+
# The index of the first character of the URL citation in the message.
|
|
223
|
+
start_index:,
|
|
224
|
+
# The title of the web resource.
|
|
225
|
+
title:,
|
|
226
|
+
# The URL of the web resource.
|
|
227
|
+
url:,
|
|
228
|
+
# The type of the URL citation. Always `url_citation`.
|
|
229
|
+
type: :url_citation
|
|
230
|
+
)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
sig do
|
|
234
|
+
override.returns(
|
|
235
|
+
{
|
|
236
|
+
end_index: Integer,
|
|
237
|
+
start_index: Integer,
|
|
238
|
+
title: String,
|
|
239
|
+
type: Symbol,
|
|
240
|
+
url: String
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
end
|
|
244
|
+
def to_hash
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
class ContainerFileCitation < OpenAI::Internal::Type::BaseModel
|
|
249
|
+
OrHash =
|
|
250
|
+
T.type_alias do
|
|
251
|
+
T.any(
|
|
252
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation,
|
|
253
|
+
OpenAI::Internal::AnyHash
|
|
254
|
+
)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# The ID of the container file.
|
|
258
|
+
sig { returns(String) }
|
|
259
|
+
attr_accessor :container_id
|
|
260
|
+
|
|
261
|
+
# The index of the last character of the container file citation in the message.
|
|
262
|
+
sig { returns(Integer) }
|
|
263
|
+
attr_accessor :end_index
|
|
264
|
+
|
|
265
|
+
# The ID of the file.
|
|
266
|
+
sig { returns(String) }
|
|
267
|
+
attr_accessor :file_id
|
|
268
|
+
|
|
269
|
+
# The filename of the container file cited.
|
|
270
|
+
sig { returns(String) }
|
|
271
|
+
attr_accessor :filename
|
|
272
|
+
|
|
273
|
+
# The index of the first character of the container file citation in the message.
|
|
274
|
+
sig { returns(Integer) }
|
|
275
|
+
attr_accessor :start_index
|
|
276
|
+
|
|
277
|
+
# The type of the container file citation. Always `container_file_citation`.
|
|
278
|
+
sig { returns(Symbol) }
|
|
279
|
+
attr_accessor :type
|
|
280
|
+
|
|
281
|
+
# A citation for a container file used to generate a model response.
|
|
282
|
+
sig do
|
|
283
|
+
params(
|
|
284
|
+
container_id: String,
|
|
285
|
+
end_index: Integer,
|
|
286
|
+
file_id: String,
|
|
287
|
+
filename: String,
|
|
288
|
+
start_index: Integer,
|
|
289
|
+
type: Symbol
|
|
290
|
+
).returns(T.attached_class)
|
|
291
|
+
end
|
|
292
|
+
def self.new(
|
|
293
|
+
# The ID of the container file.
|
|
294
|
+
container_id:,
|
|
295
|
+
# The index of the last character of the container file citation in the message.
|
|
296
|
+
end_index:,
|
|
297
|
+
# The ID of the file.
|
|
298
|
+
file_id:,
|
|
299
|
+
# The filename of the container file cited.
|
|
300
|
+
filename:,
|
|
301
|
+
# The index of the first character of the container file citation in the message.
|
|
302
|
+
start_index:,
|
|
303
|
+
# The type of the container file citation. Always `container_file_citation`.
|
|
304
|
+
type: :container_file_citation
|
|
305
|
+
)
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
sig do
|
|
309
|
+
override.returns(
|
|
310
|
+
{
|
|
311
|
+
container_id: String,
|
|
312
|
+
end_index: Integer,
|
|
313
|
+
file_id: String,
|
|
314
|
+
filename: String,
|
|
315
|
+
start_index: Integer,
|
|
316
|
+
type: Symbol
|
|
317
|
+
}
|
|
318
|
+
)
|
|
319
|
+
end
|
|
320
|
+
def to_hash
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
class FilePath < OpenAI::Internal::Type::BaseModel
|
|
325
|
+
OrHash =
|
|
326
|
+
T.type_alias do
|
|
327
|
+
T.any(
|
|
328
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::FilePath,
|
|
329
|
+
OpenAI::Internal::AnyHash
|
|
330
|
+
)
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# The ID of the file.
|
|
334
|
+
sig { returns(String) }
|
|
335
|
+
attr_accessor :file_id
|
|
336
|
+
|
|
337
|
+
# The index of the file in the list of files.
|
|
338
|
+
sig { returns(Integer) }
|
|
339
|
+
attr_accessor :index
|
|
340
|
+
|
|
341
|
+
# The type of the file path. Always `file_path`.
|
|
342
|
+
sig { returns(Symbol) }
|
|
343
|
+
attr_accessor :type
|
|
344
|
+
|
|
345
|
+
# A path to a file.
|
|
346
|
+
sig do
|
|
347
|
+
params(file_id: String, index: Integer, type: Symbol).returns(
|
|
348
|
+
T.attached_class
|
|
349
|
+
)
|
|
350
|
+
end
|
|
351
|
+
def self.new(
|
|
352
|
+
# The ID of the file.
|
|
353
|
+
file_id:,
|
|
354
|
+
# The index of the file in the list of files.
|
|
355
|
+
index:,
|
|
356
|
+
# The type of the file path. Always `file_path`.
|
|
357
|
+
type: :file_path
|
|
358
|
+
)
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
sig do
|
|
362
|
+
override.returns(
|
|
363
|
+
{ file_id: String, index: Integer, type: Symbol }
|
|
364
|
+
)
|
|
365
|
+
end
|
|
366
|
+
def to_hash
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
sig do
|
|
371
|
+
override.returns(
|
|
372
|
+
T::Array[
|
|
373
|
+
OpenAI::Responses::ResponseOutputTextAnnotationAddedEvent::Annotation::Variants
|
|
374
|
+
]
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
def self.variants
|
|
378
|
+
end
|
|
379
|
+
end
|
|
88
380
|
end
|
|
89
381
|
end
|
|
90
382
|
end
|
|
@@ -49,6 +49,11 @@ module OpenAI
|
|
|
49
49
|
# The encrypted content of the reasoning item. This is populated by default for
|
|
50
50
|
# reasoning items returned by `POST /v1/responses` and WebSocket `response.create`
|
|
51
51
|
# requests.
|
|
52
|
+
#
|
|
53
|
+
# When streaming, use the completed reasoning item and its `encrypted_content`
|
|
54
|
+
# from the `response.output_item.done` event in subsequent requests. The
|
|
55
|
+
# `encrypted_content` in `response.output_item.added` may be incomplete. This is
|
|
56
|
+
# especially important when `store` is `false` or when using Zero Data Retention.
|
|
52
57
|
sig { returns(T.nilable(String)) }
|
|
53
58
|
attr_accessor :encrypted_content
|
|
54
59
|
|
|
@@ -100,6 +105,11 @@ module OpenAI
|
|
|
100
105
|
# The encrypted content of the reasoning item. This is populated by default for
|
|
101
106
|
# reasoning items returned by `POST /v1/responses` and WebSocket `response.create`
|
|
102
107
|
# requests.
|
|
108
|
+
#
|
|
109
|
+
# When streaming, use the completed reasoning item and its `encrypted_content`
|
|
110
|
+
# from the `response.output_item.done` event in subsequent requests. The
|
|
111
|
+
# `encrypted_content` in `response.output_item.added` may be incomplete. This is
|
|
112
|
+
# especially important when `store` is `false` or when using Zero Data Retention.
|
|
103
113
|
encrypted_content: nil,
|
|
104
114
|
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
105
115
|
# Populated when items are returned via API.
|
|
@@ -286,6 +286,10 @@ module OpenAI
|
|
|
286
286
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
287
287
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
288
288
|
# request.
|
|
289
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
290
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
291
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
292
|
+
# `service_tier=ultrafast`.
|
|
289
293
|
# - When not set, the default behavior is 'auto'.
|
|
290
294
|
#
|
|
291
295
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -757,6 +761,10 @@ module OpenAI
|
|
|
757
761
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
758
762
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
759
763
|
# request.
|
|
764
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
765
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
766
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
767
|
+
# `service_tier=ultrafast`.
|
|
760
768
|
# - When not set, the default behavior is 'auto'.
|
|
761
769
|
#
|
|
762
770
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1574,6 +1582,10 @@ module OpenAI
|
|
|
1574
1582
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1575
1583
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1576
1584
|
# request.
|
|
1585
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
1586
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
1587
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
1588
|
+
# `service_tier=ultrafast`.
|
|
1577
1589
|
# - When not set, the default behavior is 'auto'.
|
|
1578
1590
|
#
|
|
1579
1591
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1622,6 +1634,11 @@ module OpenAI
|
|
|
1622
1634
|
:fast,
|
|
1623
1635
|
OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol
|
|
1624
1636
|
)
|
|
1637
|
+
ULTRAFAST =
|
|
1638
|
+
T.let(
|
|
1639
|
+
:ultrafast,
|
|
1640
|
+
OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol
|
|
1641
|
+
)
|
|
1625
1642
|
|
|
1626
1643
|
sig do
|
|
1627
1644
|
override.returns(
|
|
@@ -10,6 +10,7 @@ module OpenAI
|
|
|
10
10
|
Variants =
|
|
11
11
|
T.type_alias do
|
|
12
12
|
T.any(
|
|
13
|
+
OpenAI::Responses::ResponsesServerEvent::ResponseWsError,
|
|
13
14
|
OpenAI::Responses::ResponsesServerEvent::ResponseAudioWsDelta,
|
|
14
15
|
OpenAI::Responses::ResponsesServerEvent::ResponseAudioWsDone,
|
|
15
16
|
OpenAI::Responses::ResponsesServerEvent::ResponseAudioTranscriptWsDelta,
|
|
@@ -23,7 +24,6 @@ module OpenAI
|
|
|
23
24
|
OpenAI::Responses::ResponsesServerEvent::ResponseContentPartWsAdded,
|
|
24
25
|
OpenAI::Responses::ResponsesServerEvent::ResponseContentPartWsDone,
|
|
25
26
|
OpenAI::Responses::ResponsesServerEvent::ResponseWsCreated,
|
|
26
|
-
OpenAI::Responses::ResponsesServerEvent::ResponseWsError,
|
|
27
27
|
OpenAI::Responses::ResponsesServerEvent::ResponseFileSearchCallWsCompleted,
|
|
28
28
|
OpenAI::Responses::ResponsesServerEvent::ResponseFileSearchCallInWsProgress,
|
|
29
29
|
OpenAI::Responses::ResponsesServerEvent::ResponseFileSearchCallWsSearching,
|
|
@@ -807,67 +807,6 @@ module OpenAI
|
|
|
807
807
|
end
|
|
808
808
|
end
|
|
809
809
|
|
|
810
|
-
class ResponseWsError < OpenAI::Models::Responses::ResponseErrorEvent
|
|
811
|
-
OrHash =
|
|
812
|
-
T.type_alias do
|
|
813
|
-
T.any(
|
|
814
|
-
OpenAI::Responses::ResponsesServerEvent::ResponseWsError,
|
|
815
|
-
OpenAI::Internal::AnyHash
|
|
816
|
-
)
|
|
817
|
-
end
|
|
818
|
-
|
|
819
|
-
# The WebSocket lane that emitted this event. This field is present when the
|
|
820
|
-
# originating `response.create` event supplied a `stream_id`.
|
|
821
|
-
sig { returns(T.nilable(String)) }
|
|
822
|
-
attr_reader :stream_id
|
|
823
|
-
|
|
824
|
-
sig { params(stream_id: String).void }
|
|
825
|
-
attr_writer :stream_id
|
|
826
|
-
|
|
827
|
-
# Emitted when an error occurs.
|
|
828
|
-
sig do
|
|
829
|
-
params(
|
|
830
|
-
code: T.nilable(String),
|
|
831
|
-
message: String,
|
|
832
|
-
param: T.nilable(String),
|
|
833
|
-
sequence_number: Integer,
|
|
834
|
-
type: Symbol,
|
|
835
|
-
stream_id: String
|
|
836
|
-
).returns(T.attached_class)
|
|
837
|
-
end
|
|
838
|
-
def self.new(
|
|
839
|
-
# The error code.
|
|
840
|
-
code:,
|
|
841
|
-
# The error message.
|
|
842
|
-
message:,
|
|
843
|
-
# The error parameter.
|
|
844
|
-
param:,
|
|
845
|
-
# The sequence number of this event.
|
|
846
|
-
sequence_number:,
|
|
847
|
-
# The type of the event. Always `error`.
|
|
848
|
-
type: :error,
|
|
849
|
-
# The WebSocket lane that emitted this event.
|
|
850
|
-
# This field is present when the originating response.create supplied a stream_id.
|
|
851
|
-
stream_id: nil
|
|
852
|
-
)
|
|
853
|
-
end
|
|
854
|
-
|
|
855
|
-
sig do
|
|
856
|
-
override.returns(
|
|
857
|
-
{
|
|
858
|
-
code: T.nilable(String),
|
|
859
|
-
message: String,
|
|
860
|
-
param: T.nilable(String),
|
|
861
|
-
sequence_number: Integer,
|
|
862
|
-
type: Symbol,
|
|
863
|
-
stream_id: String
|
|
864
|
-
}
|
|
865
|
-
)
|
|
866
|
-
end
|
|
867
|
-
def to_hash
|
|
868
|
-
end
|
|
869
|
-
end
|
|
870
|
-
|
|
871
810
|
class ResponseFileSearchCallWsCompleted < OpenAI::Models::Responses::ResponseFileSearchCallCompletedEvent
|
|
872
811
|
OrHash =
|
|
873
812
|
T.type_alias do
|
|
@@ -3295,6 +3234,170 @@ module OpenAI
|
|
|
3295
3234
|
end
|
|
3296
3235
|
end
|
|
3297
3236
|
|
|
3237
|
+
class ResponseWsError < OpenAI::Internal::Type::BaseModel
|
|
3238
|
+
OrHash =
|
|
3239
|
+
T.type_alias do
|
|
3240
|
+
T.any(
|
|
3241
|
+
OpenAI::Responses::ResponsesServerEvent::ResponseWsError,
|
|
3242
|
+
OpenAI::Internal::AnyHash
|
|
3243
|
+
)
|
|
3244
|
+
end
|
|
3245
|
+
|
|
3246
|
+
# Details about the error.
|
|
3247
|
+
sig do
|
|
3248
|
+
returns(
|
|
3249
|
+
OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error
|
|
3250
|
+
)
|
|
3251
|
+
end
|
|
3252
|
+
attr_reader :error
|
|
3253
|
+
|
|
3254
|
+
sig do
|
|
3255
|
+
params(
|
|
3256
|
+
error:
|
|
3257
|
+
OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error::OrHash
|
|
3258
|
+
).void
|
|
3259
|
+
end
|
|
3260
|
+
attr_writer :error
|
|
3261
|
+
|
|
3262
|
+
# The type of the event. Always `error`.
|
|
3263
|
+
sig { returns(Symbol) }
|
|
3264
|
+
attr_accessor :type
|
|
3265
|
+
|
|
3266
|
+
# The sequence number of an error emitted by the response stream.
|
|
3267
|
+
sig { returns(T.nilable(Integer)) }
|
|
3268
|
+
attr_reader :sequence_number
|
|
3269
|
+
|
|
3270
|
+
sig { params(sequence_number: Integer).void }
|
|
3271
|
+
attr_writer :sequence_number
|
|
3272
|
+
|
|
3273
|
+
# The HTTP status code associated with a WebSocket protocol error.
|
|
3274
|
+
sig { returns(T.nilable(Integer)) }
|
|
3275
|
+
attr_reader :status
|
|
3276
|
+
|
|
3277
|
+
sig { params(status: Integer).void }
|
|
3278
|
+
attr_writer :status
|
|
3279
|
+
|
|
3280
|
+
# The WebSocket lane that emitted this event. This field is present when the
|
|
3281
|
+
# originating `response.create` event supplied a `stream_id`.
|
|
3282
|
+
sig { returns(T.nilable(String)) }
|
|
3283
|
+
attr_reader :stream_id
|
|
3284
|
+
|
|
3285
|
+
sig { params(stream_id: String).void }
|
|
3286
|
+
attr_writer :stream_id
|
|
3287
|
+
|
|
3288
|
+
# Emitted when an error occurs while processing a Responses WebSocket request.
|
|
3289
|
+
sig do
|
|
3290
|
+
params(
|
|
3291
|
+
error:
|
|
3292
|
+
OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error::OrHash,
|
|
3293
|
+
sequence_number: Integer,
|
|
3294
|
+
status: Integer,
|
|
3295
|
+
stream_id: String,
|
|
3296
|
+
type: Symbol
|
|
3297
|
+
).returns(T.attached_class)
|
|
3298
|
+
end
|
|
3299
|
+
def self.new(
|
|
3300
|
+
# Details about the error.
|
|
3301
|
+
error:,
|
|
3302
|
+
# The sequence number of an error emitted by the response stream.
|
|
3303
|
+
sequence_number: nil,
|
|
3304
|
+
# The HTTP status code associated with a WebSocket protocol error.
|
|
3305
|
+
status: nil,
|
|
3306
|
+
# The WebSocket lane that emitted this event. This field is present when the
|
|
3307
|
+
# originating `response.create` event supplied a `stream_id`.
|
|
3308
|
+
stream_id: nil,
|
|
3309
|
+
# The type of the event. Always `error`.
|
|
3310
|
+
type: :error
|
|
3311
|
+
)
|
|
3312
|
+
end
|
|
3313
|
+
|
|
3314
|
+
sig do
|
|
3315
|
+
override.returns(
|
|
3316
|
+
{
|
|
3317
|
+
error:
|
|
3318
|
+
OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error,
|
|
3319
|
+
type: Symbol,
|
|
3320
|
+
sequence_number: Integer,
|
|
3321
|
+
status: Integer,
|
|
3322
|
+
stream_id: String
|
|
3323
|
+
}
|
|
3324
|
+
)
|
|
3325
|
+
end
|
|
3326
|
+
def to_hash
|
|
3327
|
+
end
|
|
3328
|
+
|
|
3329
|
+
class Error < OpenAI::Internal::Type::BaseModel
|
|
3330
|
+
OrHash =
|
|
3331
|
+
T.type_alias do
|
|
3332
|
+
T.any(
|
|
3333
|
+
OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error,
|
|
3334
|
+
OpenAI::Internal::AnyHash
|
|
3335
|
+
)
|
|
3336
|
+
end
|
|
3337
|
+
|
|
3338
|
+
# The error code that was emitted, if any.
|
|
3339
|
+
sig { returns(T.nilable(String)) }
|
|
3340
|
+
attr_accessor :code
|
|
3341
|
+
|
|
3342
|
+
# The human-readable error message that was emitted.
|
|
3343
|
+
sig { returns(String) }
|
|
3344
|
+
attr_accessor :message
|
|
3345
|
+
|
|
3346
|
+
# The parameter name that was associated with the error, if any.
|
|
3347
|
+
sig { returns(T.nilable(String)) }
|
|
3348
|
+
attr_accessor :param
|
|
3349
|
+
|
|
3350
|
+
# The error type that was emitted.
|
|
3351
|
+
sig { returns(String) }
|
|
3352
|
+
attr_accessor :type
|
|
3353
|
+
|
|
3354
|
+
# The response headers that were emitted with the error, if any.
|
|
3355
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
3356
|
+
attr_reader :headers
|
|
3357
|
+
|
|
3358
|
+
sig { params(headers: T::Hash[Symbol, String]).void }
|
|
3359
|
+
attr_writer :headers
|
|
3360
|
+
|
|
3361
|
+
# Details about the error.
|
|
3362
|
+
sig do
|
|
3363
|
+
params(
|
|
3364
|
+
code: T.nilable(String),
|
|
3365
|
+
message: String,
|
|
3366
|
+
param: T.nilable(String),
|
|
3367
|
+
type: String,
|
|
3368
|
+
headers: T::Hash[Symbol, String]
|
|
3369
|
+
).returns(T.attached_class)
|
|
3370
|
+
end
|
|
3371
|
+
def self.new(
|
|
3372
|
+
# The error code that was emitted, if any.
|
|
3373
|
+
code:,
|
|
3374
|
+
# The human-readable error message that was emitted.
|
|
3375
|
+
message:,
|
|
3376
|
+
# The parameter name that was associated with the error, if any.
|
|
3377
|
+
param:,
|
|
3378
|
+
# The error type that was emitted.
|
|
3379
|
+
type:,
|
|
3380
|
+
# The response headers that were emitted with the error, if any.
|
|
3381
|
+
headers: nil
|
|
3382
|
+
)
|
|
3383
|
+
end
|
|
3384
|
+
|
|
3385
|
+
sig do
|
|
3386
|
+
override.returns(
|
|
3387
|
+
{
|
|
3388
|
+
code: T.nilable(String),
|
|
3389
|
+
message: String,
|
|
3390
|
+
param: T.nilable(String),
|
|
3391
|
+
type: String,
|
|
3392
|
+
headers: T::Hash[Symbol, String]
|
|
3393
|
+
}
|
|
3394
|
+
)
|
|
3395
|
+
end
|
|
3396
|
+
def to_hash
|
|
3397
|
+
end
|
|
3398
|
+
end
|
|
3399
|
+
end
|
|
3400
|
+
|
|
3298
3401
|
sig do
|
|
3299
3402
|
override.returns(
|
|
3300
3403
|
T::Array[OpenAI::Responses::ResponsesServerEvent::Variants]
|
|
@@ -13,6 +13,15 @@ module OpenAI
|
|
|
13
13
|
sig { returns(OpenAI::Responses::WebSearchTool::Type::OrSymbol) }
|
|
14
14
|
attr_accessor :type
|
|
15
15
|
|
|
16
|
+
# Allow live internet access for web search. Defaults to true when omitted. When
|
|
17
|
+
# false, the web search tool runs in offline/cache-only mode and will not fetch
|
|
18
|
+
# new external content.
|
|
19
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
20
|
+
attr_reader :external_web_access
|
|
21
|
+
|
|
22
|
+
sig { params(external_web_access: T::Boolean).void }
|
|
23
|
+
attr_writer :external_web_access
|
|
24
|
+
|
|
16
25
|
# Filters for the search.
|
|
17
26
|
sig { returns(T.nilable(OpenAI::Responses::WebSearchTool::Filters)) }
|
|
18
27
|
attr_reader :filters
|
|
@@ -63,6 +72,7 @@ module OpenAI
|
|
|
63
72
|
sig do
|
|
64
73
|
params(
|
|
65
74
|
type: OpenAI::Responses::WebSearchTool::Type::OrSymbol,
|
|
75
|
+
external_web_access: T::Boolean,
|
|
66
76
|
filters:
|
|
67
77
|
T.nilable(OpenAI::Responses::WebSearchTool::Filters::OrHash),
|
|
68
78
|
search_context_size:
|
|
@@ -74,6 +84,10 @@ module OpenAI
|
|
|
74
84
|
def self.new(
|
|
75
85
|
# The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
|
|
76
86
|
type:,
|
|
87
|
+
# Allow live internet access for web search. Defaults to true when omitted. When
|
|
88
|
+
# false, the web search tool runs in offline/cache-only mode and will not fetch
|
|
89
|
+
# new external content.
|
|
90
|
+
external_web_access: nil,
|
|
77
91
|
# Filters for the search.
|
|
78
92
|
filters: nil,
|
|
79
93
|
# High level guidance for the amount of context window space to use for the
|
|
@@ -88,6 +102,7 @@ module OpenAI
|
|
|
88
102
|
override.returns(
|
|
89
103
|
{
|
|
90
104
|
type: OpenAI::Responses::WebSearchTool::Type::OrSymbol,
|
|
105
|
+
external_web_access: T::Boolean,
|
|
91
106
|
filters: T.nilable(OpenAI::Responses::WebSearchTool::Filters),
|
|
92
107
|
search_context_size:
|
|
93
108
|
OpenAI::Responses::WebSearchTool::SearchContextSize::OrSymbol,
|