openai 0.104.0 → 0.106.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 +33 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/external_storage_configuration.rb +1 -0
- data/lib/openai/models/beta/agent_create_params.rb +3 -0
- data/lib/openai/models/beta/agent_update_params.rb +3 -0
- data/lib/openai/models/beta/agents/session_create_params.rb +3 -0
- data/lib/openai/models/beta/agents/session_update_params.rb +3 -0
- data/lib/openai/models/beta/assistant_update_params.rb +12 -0
- data/lib/openai/models/beta/beta_response.rb +12 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +12 -0
- data/lib/openai/models/beta/response_compact_params.rb +12 -0
- data/lib/openai/models/beta/response_create_params.rb +12 -0
- data/lib/openai/models/chat_model.rb +12 -0
- data/lib/openai/models/decision_create_params.rb +112 -1
- data/lib/openai/models/decision_input_image.rb +14 -1
- data/lib/openai/models/decision_input_text.rb +15 -1
- data/lib/openai/models/decision_prompt_cache_breakpoint.rb +21 -0
- data/lib/openai/models/image_edit_completed_event.rb +14 -1
- data/lib/openai/models/image_edit_params.rb +28 -5
- data/lib/openai/models/image_gen_completed_event.rb +14 -1
- data/lib/openai/models/image_generate_params.rb +28 -5
- data/lib/openai/models/images_response.rb +14 -1
- data/lib/openai/models/live/sideband_server_event.rb +243 -3
- data/lib/openai/models/responses/response_compact_params.rb +12 -0
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/beta/responses.rb +19 -0
- data/lib/openai/resources/decisions.rb +15 -1
- data/lib/openai/resources/images.rb +50 -12
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +1 -0
- data/rbi/openai/models/admin/organization/external_storage_configuration.rbi +1 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +3 -0
- data/rbi/openai/models/beta/agent_update_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/session_create_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/session_update_params.rbi +3 -0
- data/rbi/openai/models/decision_create_params.rbi +146 -0
- data/rbi/openai/models/decision_input_image.rbi +22 -1
- data/rbi/openai/models/decision_input_text.rbi +21 -1
- data/rbi/openai/models/decision_prompt_cache_breakpoint.rbi +48 -0
- data/rbi/openai/models/image_edit_completed_event.rbi +15 -1
- data/rbi/openai/models/image_edit_params.rbi +26 -4
- data/rbi/openai/models/image_gen_completed_event.rbi +15 -1
- data/rbi/openai/models/image_generate_params.rbi +26 -4
- data/rbi/openai/models/images_response.rbi +14 -0
- data/rbi/openai/models/live/output_audio_delta_event.rbi +1 -1
- data/rbi/openai/models/live/sideband_server_event.rbi +406 -3
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/beta/responses.rbi +17 -0
- data/rbi/openai/resources/decisions.rbi +14 -0
- data/rbi/openai/resources/images.rbi +44 -8
- data/sig/openai/models/admin/organization/external_storage_configuration.rbs +2 -1
- data/sig/openai/models/beta/agent_create_params.rbs +5 -1
- data/sig/openai/models/beta/agent_update_params.rbs +5 -1
- data/sig/openai/models/beta/agents/session_create_params.rbs +5 -1
- data/sig/openai/models/beta/agents/session_update_params.rbs +5 -1
- data/sig/openai/models/decision_create_params.rbs +106 -0
- data/sig/openai/models/decision_input_image.rbs +18 -2
- data/sig/openai/models/decision_input_text.rbs +29 -3
- data/sig/openai/models/decision_prompt_cache_breakpoint.rbs +16 -0
- data/sig/openai/models/image_edit_completed_event.rbs +14 -2
- data/sig/openai/models/image_edit_params.rbs +27 -6
- data/sig/openai/models/image_gen_completed_event.rbs +14 -2
- data/sig/openai/models/image_generate_params.rbs +27 -6
- data/sig/openai/models/images_response.rbs +12 -0
- data/sig/openai/models/live/sideband_server_event.rbs +225 -0
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/beta/responses.rbs +7 -0
- data/sig/openai/resources/decisions.rbs +3 -0
- data/sig/openai/resources/images.rbs +4 -0
- metadata +4 -1
|
@@ -5,8 +5,8 @@ module OpenAI
|
|
|
5
5
|
|
|
6
6
|
module Live
|
|
7
7
|
|
|
8
|
-
# Server events received by an attached Live sideband WebSocket
|
|
9
|
-
#
|
|
8
|
+
# Server events received by an attached Live sideband WebSocket, including
|
|
9
|
+
# reflected input and output audio and transport notifications.
|
|
10
10
|
module SidebandServerEvent
|
|
11
11
|
extend OpenAI::Internal::Type::Union
|
|
12
12
|
|
|
@@ -31,10 +31,413 @@ module OpenAI
|
|
|
31
31
|
OpenAI::Live::SessionUsageUpdatedEvent,
|
|
32
32
|
OpenAI::Live::SessionClosedEvent,
|
|
33
33
|
OpenAI::Live::ErrorEvent,
|
|
34
|
-
OpenAI::Live::InfoEvent
|
|
34
|
+
OpenAI::Live::InfoEvent,
|
|
35
|
+
OpenAI::Live::SidebandServerEvent::SessionInputAudioAppend,
|
|
36
|
+
OpenAI::Live::OutputAudioDeltaEvent,
|
|
37
|
+
OpenAI::Live::SidebandServerEvent::TransportDtmfReceived,
|
|
38
|
+
OpenAI::Live::SidebandServerEvent::TransportDtmfSend,
|
|
39
|
+
OpenAI::Live::SidebandServerEvent::TransportRinging,
|
|
40
|
+
OpenAI::Live::SidebandServerEvent::TransportAnswered,
|
|
41
|
+
OpenAI::Live::SidebandServerEvent::TransportFailed
|
|
35
42
|
)
|
|
36
43
|
end
|
|
37
44
|
|
|
45
|
+
class SessionInputAudioAppend < OpenAI::Internal::Type::BaseModel
|
|
46
|
+
OrHash = T.type_alias do
|
|
47
|
+
T.any(
|
|
48
|
+
OpenAI::Live::SidebandServerEvent::SessionInputAudioAppend,
|
|
49
|
+
OpenAI::Internal::AnyHash
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Base64-encoded raw mono PCM16LE at 24 kHz received from the primary transport,
|
|
54
|
+
# reflected to the sideband before model-input muting. This server event uses the
|
|
55
|
+
# same audio key as the client command, but is not an acknowledgment of it.
|
|
56
|
+
sig { returns(String) }
|
|
57
|
+
attr_accessor :audio
|
|
58
|
+
|
|
59
|
+
# The event type, always `session.input_audio.append`.
|
|
60
|
+
sig { returns(Symbol) }
|
|
61
|
+
attr_accessor :type
|
|
62
|
+
|
|
63
|
+
# Input audio received from the primary transport and reflected to a Live sideband
|
|
64
|
+
# connection before model-input muting.
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
|
|
68
|
+
audio: String,
|
|
69
|
+
|
|
70
|
+
type: Symbol
|
|
71
|
+
)
|
|
72
|
+
.returns(T.attached_class)
|
|
73
|
+
end
|
|
74
|
+
def self.new(
|
|
75
|
+
|
|
76
|
+
# Base64-encoded raw mono PCM16LE at 24 kHz received from the primary transport,
|
|
77
|
+
# reflected to the sideband before model-input muting. This server event uses the
|
|
78
|
+
# same audio key as the client command, but is not an acknowledgment of it.
|
|
79
|
+
audio:,
|
|
80
|
+
|
|
81
|
+
# The event type, always `session.input_audio.append`.
|
|
82
|
+
|
|
83
|
+
type: :"session.input_audio.append"
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
override.returns(
|
|
89
|
+
{audio: String, type: Symbol}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
def to_hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
class TransportDtmfReceived < OpenAI::Internal::Type::BaseModel
|
|
98
|
+
OrHash = T.type_alias do
|
|
99
|
+
T.any(
|
|
100
|
+
OpenAI::Live::SidebandServerEvent::TransportDtmfReceived,
|
|
101
|
+
OpenAI::Internal::AnyHash
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
sig { returns(String) }
|
|
106
|
+
attr_accessor :event
|
|
107
|
+
|
|
108
|
+
sig { returns(String) }
|
|
109
|
+
attr_accessor :event_id
|
|
110
|
+
|
|
111
|
+
sig { returns(Symbol) }
|
|
112
|
+
attr_accessor :type
|
|
113
|
+
|
|
114
|
+
# A SIP DTMF keypress received from the caller. Delivered only to sideband
|
|
115
|
+
# observers.
|
|
116
|
+
sig do
|
|
117
|
+
params(
|
|
118
|
+
|
|
119
|
+
event: String,
|
|
120
|
+
|
|
121
|
+
event_id: String,
|
|
122
|
+
|
|
123
|
+
type: Symbol
|
|
124
|
+
)
|
|
125
|
+
.returns(T.attached_class)
|
|
126
|
+
end
|
|
127
|
+
def self.new(
|
|
128
|
+
|
|
129
|
+
event:,
|
|
130
|
+
|
|
131
|
+
event_id:,
|
|
132
|
+
|
|
133
|
+
type: :"transport.dtmf.received"
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
sig do
|
|
138
|
+
override.returns(
|
|
139
|
+
{event: String, event_id: String, type: Symbol}
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
def to_hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
class TransportDtmfSend < OpenAI::Internal::Type::BaseModel
|
|
148
|
+
OrHash = T.type_alias do
|
|
149
|
+
T.any(
|
|
150
|
+
OpenAI::Live::SidebandServerEvent::TransportDtmfSend,
|
|
151
|
+
OpenAI::Internal::AnyHash
|
|
152
|
+
)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
sig { returns(String) }
|
|
156
|
+
attr_accessor :event
|
|
157
|
+
|
|
158
|
+
sig { returns(String) }
|
|
159
|
+
attr_accessor :event_id
|
|
160
|
+
|
|
161
|
+
sig { returns(Symbol) }
|
|
162
|
+
attr_accessor :type
|
|
163
|
+
|
|
164
|
+
# The event_id of the client command, when supplied.
|
|
165
|
+
sig { returns(T.nilable(String)) }
|
|
166
|
+
attr_reader :client_event_id
|
|
167
|
+
|
|
168
|
+
sig { params(client_event_id: String).void }
|
|
169
|
+
attr_writer :client_event_id
|
|
170
|
+
|
|
171
|
+
# A SIP DTMF keypress successfully sent to the SIP trunk. Delivered only to
|
|
172
|
+
# sideband observers; this is not a client command.
|
|
173
|
+
sig do
|
|
174
|
+
params(
|
|
175
|
+
|
|
176
|
+
event: String,
|
|
177
|
+
|
|
178
|
+
event_id: String,
|
|
179
|
+
|
|
180
|
+
client_event_id: String,
|
|
181
|
+
|
|
182
|
+
type: Symbol
|
|
183
|
+
)
|
|
184
|
+
.returns(T.attached_class)
|
|
185
|
+
end
|
|
186
|
+
def self.new(
|
|
187
|
+
|
|
188
|
+
event:,
|
|
189
|
+
|
|
190
|
+
event_id:,
|
|
191
|
+
|
|
192
|
+
# The event_id of the client command, when supplied.
|
|
193
|
+
client_event_id: nil,
|
|
194
|
+
|
|
195
|
+
type: :"transport.dtmf.send"
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
sig do
|
|
200
|
+
override.returns(
|
|
201
|
+
{event: String, event_id: String, type: Symbol, client_event_id: T.nilable(String)}
|
|
202
|
+
)
|
|
203
|
+
end
|
|
204
|
+
def to_hash
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
class TransportRinging < OpenAI::Internal::Type::BaseModel
|
|
210
|
+
OrHash = T.type_alias do
|
|
211
|
+
T.any(
|
|
212
|
+
OpenAI::Live::SidebandServerEvent::TransportRinging,
|
|
213
|
+
OpenAI::Internal::AnyHash
|
|
214
|
+
)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
sig { returns(String) }
|
|
218
|
+
attr_accessor :event_id
|
|
219
|
+
|
|
220
|
+
# The canonical Live session ID.
|
|
221
|
+
sig { returns(String) }
|
|
222
|
+
attr_accessor :session_id
|
|
223
|
+
|
|
224
|
+
sig { returns(Symbol) }
|
|
225
|
+
attr_accessor :type
|
|
226
|
+
|
|
227
|
+
# The outbound SIP provider leg is ringing or providing early media. Delivered
|
|
228
|
+
# only to sideband observers.
|
|
229
|
+
sig do
|
|
230
|
+
params(
|
|
231
|
+
|
|
232
|
+
event_id: String,
|
|
233
|
+
|
|
234
|
+
session_id: String,
|
|
235
|
+
|
|
236
|
+
type: Symbol
|
|
237
|
+
)
|
|
238
|
+
.returns(T.attached_class)
|
|
239
|
+
end
|
|
240
|
+
def self.new(
|
|
241
|
+
|
|
242
|
+
event_id:,
|
|
243
|
+
|
|
244
|
+
# The canonical Live session ID.
|
|
245
|
+
session_id:,
|
|
246
|
+
|
|
247
|
+
type: :"transport.ringing"
|
|
248
|
+
)
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
sig do
|
|
252
|
+
override.returns(
|
|
253
|
+
{event_id: String, session_id: String, type: Symbol}
|
|
254
|
+
)
|
|
255
|
+
end
|
|
256
|
+
def to_hash
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
class TransportAnswered < OpenAI::Internal::Type::BaseModel
|
|
262
|
+
OrHash = T.type_alias do
|
|
263
|
+
T.any(
|
|
264
|
+
OpenAI::Live::SidebandServerEvent::TransportAnswered,
|
|
265
|
+
OpenAI::Internal::AnyHash
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
sig { returns(String) }
|
|
270
|
+
attr_accessor :event_id
|
|
271
|
+
|
|
272
|
+
# The canonical Live session ID.
|
|
273
|
+
sig { returns(String) }
|
|
274
|
+
attr_accessor :session_id
|
|
275
|
+
|
|
276
|
+
sig { returns(Symbol) }
|
|
277
|
+
attr_accessor :type
|
|
278
|
+
|
|
279
|
+
# The outbound SIP provider leg answered and media is established. Delivered only
|
|
280
|
+
# to sideband observers.
|
|
281
|
+
sig do
|
|
282
|
+
params(
|
|
283
|
+
|
|
284
|
+
event_id: String,
|
|
285
|
+
|
|
286
|
+
session_id: String,
|
|
287
|
+
|
|
288
|
+
type: Symbol
|
|
289
|
+
)
|
|
290
|
+
.returns(T.attached_class)
|
|
291
|
+
end
|
|
292
|
+
def self.new(
|
|
293
|
+
|
|
294
|
+
event_id:,
|
|
295
|
+
|
|
296
|
+
# The canonical Live session ID.
|
|
297
|
+
session_id:,
|
|
298
|
+
|
|
299
|
+
type: :"transport.answered"
|
|
300
|
+
)
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
sig do
|
|
304
|
+
override.returns(
|
|
305
|
+
{event_id: String, session_id: String, type: Symbol}
|
|
306
|
+
)
|
|
307
|
+
end
|
|
308
|
+
def to_hash
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
class TransportFailed < OpenAI::Internal::Type::BaseModel
|
|
314
|
+
OrHash = T.type_alias do
|
|
315
|
+
T.any(
|
|
316
|
+
OpenAI::Live::SidebandServerEvent::TransportFailed,
|
|
317
|
+
OpenAI::Internal::AnyHash
|
|
318
|
+
)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
sig { returns(OpenAI::Live::SidebandServerEvent::TransportFailed::Error) }
|
|
322
|
+
attr_reader :error
|
|
323
|
+
|
|
324
|
+
sig { params(error: OpenAI::Live::SidebandServerEvent::TransportFailed::Error::OrHash).void }
|
|
325
|
+
attr_writer :error
|
|
326
|
+
|
|
327
|
+
sig { returns(String) }
|
|
328
|
+
attr_accessor :event_id
|
|
329
|
+
|
|
330
|
+
# The canonical Live session ID.
|
|
331
|
+
sig { returns(String) }
|
|
332
|
+
attr_accessor :session_id
|
|
333
|
+
|
|
334
|
+
sig { returns(Symbol) }
|
|
335
|
+
attr_accessor :type
|
|
336
|
+
|
|
337
|
+
# An asynchronous outbound SIP setup failure. Delivered only to sideband
|
|
338
|
+
# observers.
|
|
339
|
+
sig do
|
|
340
|
+
params(
|
|
341
|
+
|
|
342
|
+
error: OpenAI::Live::SidebandServerEvent::TransportFailed::Error::OrHash,
|
|
343
|
+
|
|
344
|
+
event_id: String,
|
|
345
|
+
|
|
346
|
+
session_id: String,
|
|
347
|
+
|
|
348
|
+
type: Symbol
|
|
349
|
+
)
|
|
350
|
+
.returns(T.attached_class)
|
|
351
|
+
end
|
|
352
|
+
def self.new(
|
|
353
|
+
|
|
354
|
+
error:,
|
|
355
|
+
|
|
356
|
+
event_id:,
|
|
357
|
+
|
|
358
|
+
# The canonical Live session ID.
|
|
359
|
+
session_id:,
|
|
360
|
+
|
|
361
|
+
type: :"transport.failed"
|
|
362
|
+
)
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
sig do
|
|
366
|
+
override.returns(
|
|
367
|
+
{
|
|
368
|
+
error: OpenAI::Live::SidebandServerEvent::TransportFailed::Error,
|
|
369
|
+
event_id: String,
|
|
370
|
+
session_id: String,
|
|
371
|
+
type: Symbol
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
end
|
|
375
|
+
def to_hash
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
class Error < OpenAI::Internal::Type::BaseModel
|
|
379
|
+
OrHash = T.type_alias do
|
|
380
|
+
T.any(
|
|
381
|
+
OpenAI::Live::SidebandServerEvent::TransportFailed::Error,
|
|
382
|
+
OpenAI::Internal::AnyHash
|
|
383
|
+
)
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# The call setup failure code.
|
|
387
|
+
sig { returns(String) }
|
|
388
|
+
attr_accessor :code
|
|
389
|
+
|
|
390
|
+
sig { returns(String) }
|
|
391
|
+
attr_accessor :message
|
|
392
|
+
|
|
393
|
+
sig { returns(Symbol) }
|
|
394
|
+
attr_accessor :type
|
|
395
|
+
|
|
396
|
+
# The parameter related to the error, if any. Empty when no parameter applies.
|
|
397
|
+
sig { returns(T.nilable(String)) }
|
|
398
|
+
attr_reader :param
|
|
399
|
+
|
|
400
|
+
sig { params(param: String).void }
|
|
401
|
+
attr_writer :param
|
|
402
|
+
|
|
403
|
+
sig do
|
|
404
|
+
params(
|
|
405
|
+
|
|
406
|
+
code: String,
|
|
407
|
+
|
|
408
|
+
message: String,
|
|
409
|
+
|
|
410
|
+
param: String,
|
|
411
|
+
|
|
412
|
+
type: Symbol
|
|
413
|
+
)
|
|
414
|
+
.returns(T.attached_class)
|
|
415
|
+
end
|
|
416
|
+
def self.new(
|
|
417
|
+
|
|
418
|
+
# The call setup failure code.
|
|
419
|
+
code:,
|
|
420
|
+
|
|
421
|
+
message:,
|
|
422
|
+
|
|
423
|
+
# The parameter related to the error, if any. Empty when no parameter applies.
|
|
424
|
+
param: nil,
|
|
425
|
+
|
|
426
|
+
type: :call_error
|
|
427
|
+
)
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
sig do
|
|
431
|
+
override.returns(
|
|
432
|
+
{code: String, message: String, type: Symbol, param: T.nilable(String)}
|
|
433
|
+
)
|
|
434
|
+
end
|
|
435
|
+
def to_hash
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
|
|
38
441
|
sig { override.returns(T::Array[OpenAI::Live::SidebandServerEvent::Variants]) }
|
|
39
442
|
def self.variants
|
|
40
443
|
end
|
data/rbi/openai/models.rbi
CHANGED
|
@@ -8,6 +8,23 @@ module OpenAI
|
|
|
8
8
|
# Create and manage model responses.
|
|
9
9
|
class Responses
|
|
10
10
|
|
|
11
|
+
include OpenAI::WebSocket::Resource
|
|
12
|
+
|
|
13
|
+
# @api private
|
|
14
|
+
sig { params(query: T::Hash[T.untyped, T.untyped]).returns(T::Hash[Symbol, T.untyped]) }
|
|
15
|
+
def __websocket_request(query: {})
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# @api private
|
|
19
|
+
sig { returns(T.untyped) }
|
|
20
|
+
def __websocket_client_event
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @api private
|
|
24
|
+
sig { returns(T.untyped) }
|
|
25
|
+
def __websocket_server_event
|
|
26
|
+
end
|
|
27
|
+
|
|
11
28
|
# Create and manage model responses.
|
|
12
29
|
sig { returns(OpenAI::Resources::Beta::Responses::InputItems) }
|
|
13
30
|
attr_reader :input_items
|
|
@@ -18,6 +18,8 @@ module OpenAI
|
|
|
18
18
|
OpenAI::DecisionCreateParams::Question::Score::OrHash
|
|
19
19
|
)
|
|
20
20
|
],
|
|
21
|
+
prompt_cache_key: T.nilable(String),
|
|
22
|
+
prompt_cache_options: T.nilable(OpenAI::DecisionCreateParams::PromptCacheOptions::OrHash),
|
|
21
23
|
safety_identifier: T.nilable(String),
|
|
22
24
|
request_options: OpenAI::RequestOptions::OrHash
|
|
23
25
|
)
|
|
@@ -34,6 +36,18 @@ module OpenAI
|
|
|
34
36
|
# Ask 1–200 questions about the input. Each question can be a predicate, choice,
|
|
35
37
|
# or score. Answers come back in the same order.
|
|
36
38
|
questions:,
|
|
39
|
+
# Partition prompt cache reuse by caller-provided key.
|
|
40
|
+
prompt_cache_key: nil,
|
|
41
|
+
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
42
|
+
# default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
43
|
+
# explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
44
|
+
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
45
|
+
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
46
|
+
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
47
|
+
# `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
48
|
+
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
49
|
+
# for current details.
|
|
50
|
+
prompt_cache_options: nil,
|
|
37
51
|
# Opaque caller-provided end-user identifier, scoped by the verified org. Match
|
|
38
52
|
# Responses' limit; this is never the authenticated user identity.
|
|
39
53
|
safety_identifier: nil,
|
|
@@ -67,6 +67,7 @@ module OpenAI
|
|
|
67
67
|
partial_images: T.nilable(Integer),
|
|
68
68
|
quality: T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol),
|
|
69
69
|
response_format: T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol),
|
|
70
|
+
safety_identifier: T.nilable(String),
|
|
70
71
|
size: T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol)),
|
|
71
72
|
user: String,
|
|
72
73
|
stream: T.noreturn,
|
|
@@ -146,6 +147,13 @@ module OpenAI
|
|
|
146
147
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
147
148
|
# image models, which always return base64-encoded images.
|
|
148
149
|
response_format: nil,
|
|
150
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
151
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
152
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
153
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
154
|
+
# when available.
|
|
155
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
156
|
+
safety_identifier: nil,
|
|
149
157
|
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
150
158
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
151
159
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
@@ -158,8 +166,9 @@ module OpenAI
|
|
|
158
166
|
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
159
167
|
# models that allow automatic sizing.
|
|
160
168
|
size: nil,
|
|
161
|
-
#
|
|
162
|
-
# and
|
|
169
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
170
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
171
|
+
# empty.
|
|
163
172
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
164
173
|
user: nil,
|
|
165
174
|
# There is no need to provide `stream:`. Instead, use `#edit_stream_raw` or
|
|
@@ -187,6 +196,7 @@ module OpenAI
|
|
|
187
196
|
partial_images: T.nilable(Integer),
|
|
188
197
|
quality: T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol),
|
|
189
198
|
response_format: T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol),
|
|
199
|
+
safety_identifier: T.nilable(String),
|
|
190
200
|
size: T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol)),
|
|
191
201
|
user: String,
|
|
192
202
|
stream: T.noreturn,
|
|
@@ -266,6 +276,13 @@ module OpenAI
|
|
|
266
276
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
267
277
|
# image models, which always return base64-encoded images.
|
|
268
278
|
response_format: nil,
|
|
279
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
280
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
281
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
282
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
283
|
+
# when available.
|
|
284
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
285
|
+
safety_identifier: nil,
|
|
269
286
|
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
270
287
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
271
288
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
@@ -278,8 +295,9 @@ module OpenAI
|
|
|
278
295
|
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
279
296
|
# models that allow automatic sizing.
|
|
280
297
|
size: nil,
|
|
281
|
-
#
|
|
282
|
-
# and
|
|
298
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
299
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
300
|
+
# empty.
|
|
283
301
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
284
302
|
user: nil,
|
|
285
303
|
# There is no need to provide `stream:`. Instead, use `#edit_stream_raw` or
|
|
@@ -305,6 +323,7 @@ module OpenAI
|
|
|
305
323
|
partial_images: T.nilable(Integer),
|
|
306
324
|
quality: T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol),
|
|
307
325
|
response_format: T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol),
|
|
326
|
+
safety_identifier: T.nilable(String),
|
|
308
327
|
size: T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)),
|
|
309
328
|
style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
|
|
310
329
|
user: String,
|
|
@@ -364,6 +383,13 @@ module OpenAI
|
|
|
364
383
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
365
384
|
# image models, which always return base64-encoded images.
|
|
366
385
|
response_format: nil,
|
|
386
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
387
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
388
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
389
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
390
|
+
# when available.
|
|
391
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
392
|
+
safety_identifier: nil,
|
|
367
393
|
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
368
394
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
369
395
|
# `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
@@ -378,8 +404,9 @@ module OpenAI
|
|
|
378
404
|
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
379
405
|
# models; describe the desired style in the prompt instead.
|
|
380
406
|
style: nil,
|
|
381
|
-
#
|
|
382
|
-
# and
|
|
407
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
408
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
409
|
+
# empty.
|
|
383
410
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
384
411
|
user: nil,
|
|
385
412
|
# There is no need to provide `stream:`. Instead, use `#generate_stream_raw` or
|
|
@@ -405,6 +432,7 @@ module OpenAI
|
|
|
405
432
|
partial_images: T.nilable(Integer),
|
|
406
433
|
quality: T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol),
|
|
407
434
|
response_format: T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol),
|
|
435
|
+
safety_identifier: T.nilable(String),
|
|
408
436
|
size: T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)),
|
|
409
437
|
style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
|
|
410
438
|
user: String,
|
|
@@ -464,6 +492,13 @@ module OpenAI
|
|
|
464
492
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
465
493
|
# image models, which always return base64-encoded images.
|
|
466
494
|
response_format: nil,
|
|
495
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
496
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
497
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
498
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
499
|
+
# when available.
|
|
500
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
501
|
+
safety_identifier: nil,
|
|
467
502
|
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
468
503
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
469
504
|
# `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
@@ -478,8 +513,9 @@ module OpenAI
|
|
|
478
513
|
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
479
514
|
# models; describe the desired style in the prompt instead.
|
|
480
515
|
style: nil,
|
|
481
|
-
#
|
|
482
|
-
# and
|
|
516
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
517
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
518
|
+
# empty.
|
|
483
519
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
484
520
|
user: nil,
|
|
485
521
|
# There is no need to provide `stream:`. Instead, use `#generate_stream_raw` or
|
|
@@ -60,13 +60,14 @@ module OpenAI
|
|
|
60
60
|
def self?.variants: -> ::Array[OpenAI::Models::Admin::Organization::ExternalStorageConfiguration::provider]
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
type status = :pending | :validated | :unhealthy
|
|
63
|
+
type status = :pending | :validated | :degraded | :unhealthy
|
|
64
64
|
|
|
65
65
|
module Status
|
|
66
66
|
extend OpenAI::Internal::Type::Enum
|
|
67
67
|
|
|
68
68
|
PENDING: :pending
|
|
69
69
|
VALIDATED: :validated
|
|
70
|
+
DEGRADED: :degraded
|
|
70
71
|
UNHEALTHY: :unhealthy
|
|
71
72
|
|
|
72
73
|
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::ExternalStorageConfiguration::status]
|
|
@@ -100,7 +100,8 @@ module OpenAI
|
|
|
100
100
|
?request_options: OpenAI::RequestOptions
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
type service_tier =
|
|
103
|
+
type service_tier =
|
|
104
|
+
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
104
105
|
|
|
105
106
|
module ServiceTier
|
|
106
107
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -120,6 +121,9 @@ module OpenAI
|
|
|
120
121
|
# Uses the fast service tier.
|
|
121
122
|
FAST: :fast
|
|
122
123
|
|
|
124
|
+
# Uses the ultrafast service tier.
|
|
125
|
+
ULTRAFAST: :ultrafast
|
|
126
|
+
|
|
123
127
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentCreateParams::service_tier]
|
|
124
128
|
end
|
|
125
129
|
end
|
|
@@ -108,7 +108,8 @@ module OpenAI
|
|
|
108
108
|
?request_options: OpenAI::RequestOptions
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
type service_tier =
|
|
111
|
+
type service_tier =
|
|
112
|
+
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
112
113
|
|
|
113
114
|
module ServiceTier
|
|
114
115
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -128,6 +129,9 @@ module OpenAI
|
|
|
128
129
|
# Uses the fast service tier.
|
|
129
130
|
FAST: :fast
|
|
130
131
|
|
|
132
|
+
# Uses the ultrafast service tier.
|
|
133
|
+
ULTRAFAST: :ultrafast
|
|
134
|
+
|
|
131
135
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentUpdateParams::service_tier]
|
|
132
136
|
end
|
|
133
137
|
end
|