openai 0.74.0 → 0.75.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 +8 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/models/beta/response_compact_params.rb +32 -3
- data/lib/openai/models/content_provenance_check.rb +221 -0
- data/lib/openai/models/content_provenance_check_create_params.rb +22 -0
- data/lib/openai/models/responses/response_compact_params.rb +32 -3
- data/lib/openai/models.rb +4 -0
- data/lib/openai/resources/beta/responses.rb +1 -1
- data/lib/openai/resources/content_provenance_checks.rb +46 -0
- data/lib/openai/resources/responses.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +3 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +50 -3
- data/rbi/openai/models/content_provenance_check.rbi +413 -0
- data/rbi/openai/models/content_provenance_check_create_params.rbi +46 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +50 -3
- data/rbi/openai/models.rbi +5 -0
- data/rbi/openai/resources/beta/responses.rbi +15 -1
- data/rbi/openai/resources/content_provenance_checks.rbi +34 -0
- data/rbi/openai/resources/responses.rbi +15 -1
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/models/beta/response_compact_params.rbs +2 -1
- data/sig/openai/models/content_provenance_check.rbs +159 -0
- data/sig/openai/models/content_provenance_check_create_params.rbs +24 -0
- data/sig/openai/models/responses/response_compact_params.rbs +2 -1
- data/sig/openai/models.rbs +4 -0
- data/sig/openai/resources/content_provenance_checks.rbs +12 -0
- metadata +11 -2
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class ContentProvenanceCheck < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(OpenAI::ContentProvenanceCheck, OpenAI::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The Unix timestamp, in seconds, when the provenance check was created.
|
|
12
|
+
sig { returns(Integer) }
|
|
13
|
+
attr_accessor :created_at
|
|
14
|
+
|
|
15
|
+
# The object type. Always `content_provenance_check` for this endpoint.
|
|
16
|
+
sig { returns(OpenAI::ContentProvenanceCheck::Object::TaggedSymbol) }
|
|
17
|
+
attr_accessor :object
|
|
18
|
+
|
|
19
|
+
# The provenance results that apply to the uploaded file. Image results include
|
|
20
|
+
# C2PA and SynthID; audio results include SynthID.
|
|
21
|
+
sig do
|
|
22
|
+
returns(T::Array[OpenAI::ContentProvenanceCheck::Result::Variants])
|
|
23
|
+
end
|
|
24
|
+
attr_accessor :results
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
created_at: Integer,
|
|
29
|
+
object: OpenAI::ContentProvenanceCheck::Object::OrSymbol,
|
|
30
|
+
results:
|
|
31
|
+
T::Array[
|
|
32
|
+
T.any(
|
|
33
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::OrHash,
|
|
34
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::OrHash
|
|
35
|
+
)
|
|
36
|
+
]
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
# The Unix timestamp, in seconds, when the provenance check was created.
|
|
41
|
+
created_at:,
|
|
42
|
+
# The object type. Always `content_provenance_check` for this endpoint.
|
|
43
|
+
object:,
|
|
44
|
+
# The provenance results that apply to the uploaded file. Image results include
|
|
45
|
+
# C2PA and SynthID; audio results include SynthID.
|
|
46
|
+
results:
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
created_at: Integer,
|
|
54
|
+
object: OpenAI::ContentProvenanceCheck::Object::TaggedSymbol,
|
|
55
|
+
results: T::Array[OpenAI::ContentProvenanceCheck::Result::Variants]
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# The object type. Always `content_provenance_check` for this endpoint.
|
|
63
|
+
module Object
|
|
64
|
+
extend OpenAI::Internal::Type::Enum
|
|
65
|
+
|
|
66
|
+
TaggedSymbol =
|
|
67
|
+
T.type_alias { T.all(Symbol, OpenAI::ContentProvenanceCheck::Object) }
|
|
68
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
69
|
+
|
|
70
|
+
CONTENT_PROVENANCE_CHECK =
|
|
71
|
+
T.let(
|
|
72
|
+
:content_provenance_check,
|
|
73
|
+
OpenAI::ContentProvenanceCheck::Object::TaggedSymbol
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
T::Array[OpenAI::ContentProvenanceCheck::Object::TaggedSymbol]
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
def self.values
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
module Result
|
|
86
|
+
extend OpenAI::Internal::Type::Union
|
|
87
|
+
|
|
88
|
+
Variants =
|
|
89
|
+
T.type_alias do
|
|
90
|
+
T.any(
|
|
91
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA,
|
|
92
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
class C2PA < OpenAI::Internal::Type::BaseModel
|
|
97
|
+
OrHash =
|
|
98
|
+
T.type_alias do
|
|
99
|
+
T.any(
|
|
100
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA,
|
|
101
|
+
OpenAI::Internal::AnyHash
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
106
|
+
# was generated, when available.
|
|
107
|
+
sig { returns(T.nilable(String)) }
|
|
108
|
+
attr_accessor :generated_at
|
|
109
|
+
|
|
110
|
+
# The C2PA manifest issuer, when available.
|
|
111
|
+
sig { returns(T.nilable(String)) }
|
|
112
|
+
attr_accessor :issuer
|
|
113
|
+
|
|
114
|
+
# The OpenAI model recorded by the provenance signal, when available.
|
|
115
|
+
sig { returns(T.nilable(String)) }
|
|
116
|
+
attr_accessor :model
|
|
117
|
+
|
|
118
|
+
# Whether a supported OpenAI C2PA provenance signal was detected. If
|
|
119
|
+
# `not_detected`, it means the tool did not find supported signals in the uploaded
|
|
120
|
+
# file. The content could still have been generated by OpenAI if the metadata was
|
|
121
|
+
# stripped or has evidence of tampering, the watermark was degraded, it comes from
|
|
122
|
+
# a legacy generation model, or it was created before provenance signals were
|
|
123
|
+
# available. Content could also still be AI-generated by another company's model,
|
|
124
|
+
# which the tool currently does not detect.
|
|
125
|
+
sig do
|
|
126
|
+
returns(
|
|
127
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome::TaggedSymbol
|
|
128
|
+
)
|
|
129
|
+
end
|
|
130
|
+
attr_accessor :outcome
|
|
131
|
+
|
|
132
|
+
# The provenance signal type. Always `c2pa`.
|
|
133
|
+
sig { returns(Symbol) }
|
|
134
|
+
attr_accessor :type
|
|
135
|
+
|
|
136
|
+
# The validation status of the C2PA manifest in the uploaded image.
|
|
137
|
+
sig do
|
|
138
|
+
returns(
|
|
139
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::TaggedSymbol
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
attr_accessor :validation_state
|
|
143
|
+
|
|
144
|
+
sig do
|
|
145
|
+
params(
|
|
146
|
+
generated_at: T.nilable(String),
|
|
147
|
+
issuer: T.nilable(String),
|
|
148
|
+
model: T.nilable(String),
|
|
149
|
+
outcome:
|
|
150
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome::OrSymbol,
|
|
151
|
+
validation_state:
|
|
152
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::OrSymbol,
|
|
153
|
+
type: Symbol
|
|
154
|
+
).returns(T.attached_class)
|
|
155
|
+
end
|
|
156
|
+
def self.new(
|
|
157
|
+
# The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
158
|
+
# was generated, when available.
|
|
159
|
+
generated_at:,
|
|
160
|
+
# The C2PA manifest issuer, when available.
|
|
161
|
+
issuer:,
|
|
162
|
+
# The OpenAI model recorded by the provenance signal, when available.
|
|
163
|
+
model:,
|
|
164
|
+
# Whether a supported OpenAI C2PA provenance signal was detected. If
|
|
165
|
+
# `not_detected`, it means the tool did not find supported signals in the uploaded
|
|
166
|
+
# file. The content could still have been generated by OpenAI if the metadata was
|
|
167
|
+
# stripped or has evidence of tampering, the watermark was degraded, it comes from
|
|
168
|
+
# a legacy generation model, or it was created before provenance signals were
|
|
169
|
+
# available. Content could also still be AI-generated by another company's model,
|
|
170
|
+
# which the tool currently does not detect.
|
|
171
|
+
outcome:,
|
|
172
|
+
# The validation status of the C2PA manifest in the uploaded image.
|
|
173
|
+
validation_state:,
|
|
174
|
+
# The provenance signal type. Always `c2pa`.
|
|
175
|
+
type: :c2pa
|
|
176
|
+
)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
sig do
|
|
180
|
+
override.returns(
|
|
181
|
+
{
|
|
182
|
+
generated_at: T.nilable(String),
|
|
183
|
+
issuer: T.nilable(String),
|
|
184
|
+
model: T.nilable(String),
|
|
185
|
+
outcome:
|
|
186
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome::TaggedSymbol,
|
|
187
|
+
type: Symbol,
|
|
188
|
+
validation_state:
|
|
189
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::TaggedSymbol
|
|
190
|
+
}
|
|
191
|
+
)
|
|
192
|
+
end
|
|
193
|
+
def to_hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Whether a supported OpenAI C2PA provenance signal was detected. If
|
|
197
|
+
# `not_detected`, it means the tool did not find supported signals in the uploaded
|
|
198
|
+
# file. The content could still have been generated by OpenAI if the metadata was
|
|
199
|
+
# stripped or has evidence of tampering, the watermark was degraded, it comes from
|
|
200
|
+
# a legacy generation model, or it was created before provenance signals were
|
|
201
|
+
# available. Content could also still be AI-generated by another company's model,
|
|
202
|
+
# which the tool currently does not detect.
|
|
203
|
+
module Outcome
|
|
204
|
+
extend OpenAI::Internal::Type::Enum
|
|
205
|
+
|
|
206
|
+
TaggedSymbol =
|
|
207
|
+
T.type_alias do
|
|
208
|
+
T.all(
|
|
209
|
+
Symbol,
|
|
210
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
214
|
+
|
|
215
|
+
DETECTED =
|
|
216
|
+
T.let(
|
|
217
|
+
:detected,
|
|
218
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome::TaggedSymbol
|
|
219
|
+
)
|
|
220
|
+
NOT_DETECTED =
|
|
221
|
+
T.let(
|
|
222
|
+
:not_detected,
|
|
223
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome::TaggedSymbol
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
sig do
|
|
227
|
+
override.returns(
|
|
228
|
+
T::Array[
|
|
229
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome::TaggedSymbol
|
|
230
|
+
]
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
def self.values
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# The validation status of the C2PA manifest in the uploaded image.
|
|
238
|
+
module ValidationState
|
|
239
|
+
extend OpenAI::Internal::Type::Enum
|
|
240
|
+
|
|
241
|
+
TaggedSymbol =
|
|
242
|
+
T.type_alias do
|
|
243
|
+
T.all(
|
|
244
|
+
Symbol,
|
|
245
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState
|
|
246
|
+
)
|
|
247
|
+
end
|
|
248
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
249
|
+
|
|
250
|
+
TRUSTED =
|
|
251
|
+
T.let(
|
|
252
|
+
:trusted,
|
|
253
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::TaggedSymbol
|
|
254
|
+
)
|
|
255
|
+
VALID =
|
|
256
|
+
T.let(
|
|
257
|
+
:valid,
|
|
258
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::TaggedSymbol
|
|
259
|
+
)
|
|
260
|
+
INVALID =
|
|
261
|
+
T.let(
|
|
262
|
+
:invalid,
|
|
263
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::TaggedSymbol
|
|
264
|
+
)
|
|
265
|
+
NOT_PRESENT =
|
|
266
|
+
T.let(
|
|
267
|
+
:not_present,
|
|
268
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::TaggedSymbol
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
sig do
|
|
272
|
+
override.returns(
|
|
273
|
+
T::Array[
|
|
274
|
+
OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState::TaggedSymbol
|
|
275
|
+
]
|
|
276
|
+
)
|
|
277
|
+
end
|
|
278
|
+
def self.values
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
class SynthID < OpenAI::Internal::Type::BaseModel
|
|
284
|
+
OrHash =
|
|
285
|
+
T.type_alias do
|
|
286
|
+
T.any(
|
|
287
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID,
|
|
288
|
+
OpenAI::Internal::AnyHash
|
|
289
|
+
)
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
293
|
+
# was generated, when available.
|
|
294
|
+
sig { returns(T.nilable(String)) }
|
|
295
|
+
attr_accessor :generated_at
|
|
296
|
+
|
|
297
|
+
# The OpenAI model recorded by the provenance signal, when available.
|
|
298
|
+
sig { returns(T.nilable(String)) }
|
|
299
|
+
attr_accessor :model
|
|
300
|
+
|
|
301
|
+
# Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it
|
|
302
|
+
# means the tool did not find supported signals in the uploaded file. The content
|
|
303
|
+
# could still have been generated by OpenAI if the metadata was stripped or has
|
|
304
|
+
# evidence of tampering, the watermark was degraded, it comes from a legacy
|
|
305
|
+
# generation model, or it was created before provenance signals were available.
|
|
306
|
+
# Content could also still be AI-generated by another company's model, which the
|
|
307
|
+
# tool currently does not detect.
|
|
308
|
+
sig do
|
|
309
|
+
returns(
|
|
310
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome::TaggedSymbol
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
attr_accessor :outcome
|
|
314
|
+
|
|
315
|
+
# The provenance signal type. Always `synthid`.
|
|
316
|
+
sig { returns(Symbol) }
|
|
317
|
+
attr_accessor :type
|
|
318
|
+
|
|
319
|
+
sig do
|
|
320
|
+
params(
|
|
321
|
+
generated_at: T.nilable(String),
|
|
322
|
+
model: T.nilable(String),
|
|
323
|
+
outcome:
|
|
324
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome::OrSymbol,
|
|
325
|
+
type: Symbol
|
|
326
|
+
).returns(T.attached_class)
|
|
327
|
+
end
|
|
328
|
+
def self.new(
|
|
329
|
+
# The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
330
|
+
# was generated, when available.
|
|
331
|
+
generated_at:,
|
|
332
|
+
# The OpenAI model recorded by the provenance signal, when available.
|
|
333
|
+
model:,
|
|
334
|
+
# Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it
|
|
335
|
+
# means the tool did not find supported signals in the uploaded file. The content
|
|
336
|
+
# could still have been generated by OpenAI if the metadata was stripped or has
|
|
337
|
+
# evidence of tampering, the watermark was degraded, it comes from a legacy
|
|
338
|
+
# generation model, or it was created before provenance signals were available.
|
|
339
|
+
# Content could also still be AI-generated by another company's model, which the
|
|
340
|
+
# tool currently does not detect.
|
|
341
|
+
outcome:,
|
|
342
|
+
# The provenance signal type. Always `synthid`.
|
|
343
|
+
type: :synthid
|
|
344
|
+
)
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
sig do
|
|
348
|
+
override.returns(
|
|
349
|
+
{
|
|
350
|
+
generated_at: T.nilable(String),
|
|
351
|
+
model: T.nilable(String),
|
|
352
|
+
outcome:
|
|
353
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome::TaggedSymbol,
|
|
354
|
+
type: Symbol
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
end
|
|
358
|
+
def to_hash
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it
|
|
362
|
+
# means the tool did not find supported signals in the uploaded file. The content
|
|
363
|
+
# could still have been generated by OpenAI if the metadata was stripped or has
|
|
364
|
+
# evidence of tampering, the watermark was degraded, it comes from a legacy
|
|
365
|
+
# generation model, or it was created before provenance signals were available.
|
|
366
|
+
# Content could also still be AI-generated by another company's model, which the
|
|
367
|
+
# tool currently does not detect.
|
|
368
|
+
module Outcome
|
|
369
|
+
extend OpenAI::Internal::Type::Enum
|
|
370
|
+
|
|
371
|
+
TaggedSymbol =
|
|
372
|
+
T.type_alias do
|
|
373
|
+
T.all(
|
|
374
|
+
Symbol,
|
|
375
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome
|
|
376
|
+
)
|
|
377
|
+
end
|
|
378
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
379
|
+
|
|
380
|
+
DETECTED =
|
|
381
|
+
T.let(
|
|
382
|
+
:detected,
|
|
383
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome::TaggedSymbol
|
|
384
|
+
)
|
|
385
|
+
NOT_DETECTED =
|
|
386
|
+
T.let(
|
|
387
|
+
:not_detected,
|
|
388
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome::TaggedSymbol
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
sig do
|
|
392
|
+
override.returns(
|
|
393
|
+
T::Array[
|
|
394
|
+
OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome::TaggedSymbol
|
|
395
|
+
]
|
|
396
|
+
)
|
|
397
|
+
end
|
|
398
|
+
def self.values
|
|
399
|
+
end
|
|
400
|
+
end
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
sig do
|
|
404
|
+
override.returns(
|
|
405
|
+
T::Array[OpenAI::ContentProvenanceCheck::Result::Variants]
|
|
406
|
+
)
|
|
407
|
+
end
|
|
408
|
+
def self.variants
|
|
409
|
+
end
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
end
|
|
413
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class ContentProvenanceCheckCreateParams < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::ContentProvenanceCheckCreateParams,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The image or audio file to check for supported OpenAI provenance signals.
|
|
18
|
+
sig { returns(OpenAI::Internal::FileInput) }
|
|
19
|
+
attr_accessor :file
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
file: OpenAI::Internal::FileInput,
|
|
24
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(
|
|
28
|
+
# The image or audio file to check for supported OpenAI provenance signals.
|
|
29
|
+
file:,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
file: OpenAI::Internal::FileInput,
|
|
38
|
+
request_options: OpenAI::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -96,7 +96,21 @@ module OpenAI
|
|
|
96
96
|
end
|
|
97
97
|
attr_accessor :prompt_cache_retention
|
|
98
98
|
|
|
99
|
-
#
|
|
99
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
100
|
+
# then the request will be processed with the service tier configured in the
|
|
101
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
102
|
+
# If set to 'default', then the request will be processed with the standard
|
|
103
|
+
# pricing and performance for the selected model. - If set to
|
|
104
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
105
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
106
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
107
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
108
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
109
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
110
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
111
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
112
|
+
# actually used to serve the request. This response value may be different from
|
|
113
|
+
# the value set in the parameter.
|
|
100
114
|
sig do
|
|
101
115
|
returns(
|
|
102
116
|
T.nilable(
|
|
@@ -170,7 +184,21 @@ module OpenAI
|
|
|
170
184
|
prompt_cache_options: nil,
|
|
171
185
|
# How long to retain a prompt cache entry created by this request.
|
|
172
186
|
prompt_cache_retention: nil,
|
|
173
|
-
#
|
|
187
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
188
|
+
# then the request will be processed with the service tier configured in the
|
|
189
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
190
|
+
# If set to 'default', then the request will be processed with the standard
|
|
191
|
+
# pricing and performance for the selected model. - If set to
|
|
192
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
193
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
194
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
195
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
196
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
197
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
198
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
199
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
200
|
+
# actually used to serve the request. This response value may be different from
|
|
201
|
+
# the value set in the parameter.
|
|
174
202
|
service_tier: nil,
|
|
175
203
|
request_options: {}
|
|
176
204
|
)
|
|
@@ -957,7 +985,21 @@ module OpenAI
|
|
|
957
985
|
end
|
|
958
986
|
end
|
|
959
987
|
|
|
960
|
-
#
|
|
988
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
989
|
+
# then the request will be processed with the service tier configured in the
|
|
990
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
991
|
+
# If set to 'default', then the request will be processed with the standard
|
|
992
|
+
# pricing and performance for the selected model. - If set to
|
|
993
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
994
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
995
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
996
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
997
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
998
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
999
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
1000
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
1001
|
+
# actually used to serve the request. This response value may be different from
|
|
1002
|
+
# the value set in the parameter.
|
|
961
1003
|
module ServiceTier
|
|
962
1004
|
extend OpenAI::Internal::Type::Enum
|
|
963
1005
|
|
|
@@ -980,6 +1022,11 @@ module OpenAI
|
|
|
980
1022
|
:default,
|
|
981
1023
|
OpenAI::Responses::ResponseCompactParams::ServiceTier::TaggedSymbol
|
|
982
1024
|
)
|
|
1025
|
+
FAST =
|
|
1026
|
+
T.let(
|
|
1027
|
+
:fast,
|
|
1028
|
+
OpenAI::Responses::ResponseCompactParams::ServiceTier::TaggedSymbol
|
|
1029
|
+
)
|
|
983
1030
|
FLEX =
|
|
984
1031
|
T.let(
|
|
985
1032
|
:flex,
|
data/rbi/openai/models.rbi
CHANGED
|
@@ -57,6 +57,11 @@ module OpenAI
|
|
|
57
57
|
|
|
58
58
|
Containers = OpenAI::Models::Containers
|
|
59
59
|
|
|
60
|
+
ContentProvenanceCheck = OpenAI::Models::ContentProvenanceCheck
|
|
61
|
+
|
|
62
|
+
ContentProvenanceCheckCreateParams =
|
|
63
|
+
OpenAI::Models::ContentProvenanceCheckCreateParams
|
|
64
|
+
|
|
60
65
|
Conversations = OpenAI::Models::Conversations
|
|
61
66
|
|
|
62
67
|
CreateEmbeddingResponse = OpenAI::Models::CreateEmbeddingResponse
|
|
@@ -893,7 +893,21 @@ module OpenAI
|
|
|
893
893
|
prompt_cache_options: nil,
|
|
894
894
|
# Body param: How long to retain a prompt cache entry created by this request.
|
|
895
895
|
prompt_cache_retention: nil,
|
|
896
|
-
# Body param:
|
|
896
|
+
# Body param: Specifies the processing type used for serving the request. - If set
|
|
897
|
+
# to 'auto', then the request will be processed with the service tier configured
|
|
898
|
+
# in the Project settings. Unless otherwise configured, the Project will use
|
|
899
|
+
# 'default'. - If set to 'default', then the request will be processed with the
|
|
900
|
+
# standard pricing and performance for the selected model. - If set to
|
|
901
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
902
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
903
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
904
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
905
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
906
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
907
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
908
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
909
|
+
# actually used to serve the request. This response value may be different from
|
|
910
|
+
# the value set in the parameter.
|
|
897
911
|
service_tier: nil,
|
|
898
912
|
# Header param: Optional beta features to enable for this request.
|
|
899
913
|
betas: nil,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Resources
|
|
5
|
+
class ContentProvenanceChecks
|
|
6
|
+
# Check whether an image or audio file contains known OpenAI provenance signals.
|
|
7
|
+
# [Learn more about content provenance](/api/docs/guides/content-provenance).
|
|
8
|
+
#
|
|
9
|
+
# If `not_detected`, it means the tool did not find supported signals in the
|
|
10
|
+
# uploaded file. The content could still have been generated by OpenAI if the
|
|
11
|
+
# metadata was stripped or has evidence of tampering, the watermark was degraded,
|
|
12
|
+
# it comes from a legacy generation model, or it was created before provenance
|
|
13
|
+
# signals were available. Content could also still be AI-generated by another
|
|
14
|
+
# company's model, which the tool currently does not detect.
|
|
15
|
+
sig do
|
|
16
|
+
params(
|
|
17
|
+
file: OpenAI::Internal::FileInput,
|
|
18
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
19
|
+
).returns(OpenAI::ContentProvenanceCheck)
|
|
20
|
+
end
|
|
21
|
+
def create(
|
|
22
|
+
# The image or audio file to check for supported OpenAI provenance signals.
|
|
23
|
+
file:,
|
|
24
|
+
request_options: {}
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @api private
|
|
29
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
30
|
+
def self.new(client:)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -1112,7 +1112,21 @@ module OpenAI
|
|
|
1112
1112
|
prompt_cache_options: nil,
|
|
1113
1113
|
# How long to retain a prompt cache entry created by this request.
|
|
1114
1114
|
prompt_cache_retention: nil,
|
|
1115
|
-
#
|
|
1115
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
1116
|
+
# then the request will be processed with the service tier configured in the
|
|
1117
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
1118
|
+
# If set to 'default', then the request will be processed with the standard
|
|
1119
|
+
# pricing and performance for the selected model. - If set to
|
|
1120
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
1121
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
1122
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
1123
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
1124
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
1125
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
1126
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
1127
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
1128
|
+
# actually used to serve the request. This response value may be different from
|
|
1129
|
+
# the value set in the parameter.
|
|
1116
1130
|
service_tier: nil,
|
|
1117
1131
|
request_options: {}
|
|
1118
1132
|
)
|
data/sig/openai/client.rbs
CHANGED
|
@@ -30,6 +30,8 @@ module OpenAI
|
|
|
30
30
|
|
|
31
31
|
attr_reader images: OpenAI::Resources::Images
|
|
32
32
|
|
|
33
|
+
attr_reader content_provenance_checks: OpenAI::Resources::ContentProvenanceChecks
|
|
34
|
+
|
|
33
35
|
attr_reader audio: OpenAI::Resources::Audio
|
|
34
36
|
|
|
35
37
|
attr_reader moderations: OpenAI::Resources::Moderations
|
|
@@ -340,13 +340,14 @@ module OpenAI
|
|
|
340
340
|
def self?.values: -> ::Array[OpenAI::Models::Beta::ResponseCompactParams::prompt_cache_retention]
|
|
341
341
|
end
|
|
342
342
|
|
|
343
|
-
type service_tier = :auto | :default | :flex | :priority
|
|
343
|
+
type service_tier = :auto | :default | :fast | :flex | :priority
|
|
344
344
|
|
|
345
345
|
module ServiceTier
|
|
346
346
|
extend OpenAI::Internal::Type::Enum
|
|
347
347
|
|
|
348
348
|
AUTO: :auto
|
|
349
349
|
DEFAULT: :default
|
|
350
|
+
FAST: :fast
|
|
350
351
|
FLEX: :flex
|
|
351
352
|
PRIORITY: :priority
|
|
352
353
|
|