openai 0.73.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 +16 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/models/beta/beta_response.rb +15 -6
- data/lib/openai/models/beta/beta_responses_client_event.rb +15 -6
- data/lib/openai/models/beta/response_compact_params.rb +32 -3
- data/lib/openai/models/beta/response_create_params.rb +15 -6
- data/lib/openai/models/chat/chat_completion.rb +15 -6
- data/lib/openai/models/chat/chat_completion_chunk.rb +15 -6
- data/lib/openai/models/chat/completion_create_params.rb +15 -6
- 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.rb +15 -6
- data/lib/openai/models/responses/response_compact_params.rb +32 -3
- data/lib/openai/models/responses/response_create_params.rb +15 -6
- data/lib/openai/models/responses/responses_client_event.rb +15 -6
- 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/beta_response.rbi +23 -9
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +26 -9
- data/rbi/openai/models/beta/response_compact_params.rbi +50 -3
- data/rbi/openai/models/beta/response_create_params.rbi +26 -9
- data/rbi/openai/models/chat/chat_completion.rbi +26 -9
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +26 -9
- data/rbi/openai/models/chat/completion_create_params.rbi +26 -9
- 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.rbi +23 -9
- data/rbi/openai/models/responses/response_compact_params.rbi +50 -3
- data/rbi/openai/models/responses/response_create_params.rbi +26 -9
- data/rbi/openai/models/responses/responses_client_event.rbi +26 -9
- data/rbi/openai/models.rbi +5 -0
- data/rbi/openai/resources/beta/responses.rbi +29 -7
- data/rbi/openai/resources/chat/completions.rbi +14 -6
- data/rbi/openai/resources/content_provenance_checks.rbi +34 -0
- data/rbi/openai/resources/responses.rbi +29 -7
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/models/beta/beta_response.rbs +3 -1
- data/sig/openai/models/beta/beta_responses_client_event.rbs +3 -1
- data/sig/openai/models/beta/response_compact_params.rbs +2 -1
- data/sig/openai/models/beta/response_create_params.rbs +3 -1
- data/sig/openai/models/chat/chat_completion.rbs +3 -1
- data/sig/openai/models/chat/chat_completion_chunk.rbs +3 -1
- data/sig/openai/models/chat/completion_create_params.rbs +3 -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.rbs +3 -1
- data/sig/openai/models/responses/response_compact_params.rbs +2 -1
- data/sig/openai/models/responses/response_create_params.rbs +3 -1
- data/sig/openai/models/responses/responses_client_event.rbs +3 -1
- data/sig/openai/models.rbs +4 -0
- data/sig/openai/resources/content_provenance_checks.rbs +12 -0
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f37ed6a1d2d71172c0518b0084e33f43eccb810d556234a8a94a6b2436fe481
|
|
4
|
+
data.tar.gz: 4e5d4364cf54131f78c0d7ed39b699a55b4b87a9354a5ea46336157afdf097ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38784a4f8a73c2d4c0d1126e6f88d47649879f18835c24a6c2411efcca52cbc84211cfbb19e45524aca10c3c9951f1b7ee8fa736d16811325577e791e85ed3ef
|
|
7
|
+
data.tar.gz: a391891d80016f08701d8906cf3800adf32ca3966af91eec7636fe59884edaf46532056a40cfffb66a56f6138c264efd2f7e15d5b6cf2b0f64ace1ead0d56dc7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.75.0 (2026-07-31)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.74.0...v0.75.0](https://github.com/openai/openai-ruby/compare/v0.74.0...v0.75.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** content provenance checks ([62229f3](https://github.com/openai/openai-ruby/commit/62229f3057975721ebe6d904c05da905b57e7255))
|
|
10
|
+
|
|
11
|
+
## 0.74.0 (2026-07-30)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.73.0...v0.74.0](https://github.com/openai/openai-ruby/compare/v0.73.0...v0.74.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** fast tier ([4165ec8](https://github.com/openai/openai-ruby/commit/4165ec8e6bc100f932e3787d6c5412e89496c0e9))
|
|
18
|
+
|
|
3
19
|
## 0.73.0 (2026-07-28)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.72.0...v0.73.0](https://github.com/openai/openai-ruby/compare/v0.72.0...v0.73.0)
|
data/README.md
CHANGED
data/lib/openai/client.rb
CHANGED
|
@@ -58,6 +58,9 @@ module OpenAI
|
|
|
58
58
|
# @return [OpenAI::Resources::Images]
|
|
59
59
|
attr_reader :images
|
|
60
60
|
|
|
61
|
+
# @return [OpenAI::Resources::ContentProvenanceChecks]
|
|
62
|
+
attr_reader :content_provenance_checks
|
|
63
|
+
|
|
61
64
|
# @return [OpenAI::Resources::Audio]
|
|
62
65
|
attr_reader :audio
|
|
63
66
|
|
|
@@ -349,6 +352,7 @@ module OpenAI
|
|
|
349
352
|
@embeddings = OpenAI::Resources::Embeddings.new(client: self)
|
|
350
353
|
@files = OpenAI::Resources::Files.new(client: self)
|
|
351
354
|
@images = OpenAI::Resources::Images.new(client: self)
|
|
355
|
+
@content_provenance_checks = OpenAI::Resources::ContentProvenanceChecks.new(client: self)
|
|
352
356
|
@audio = OpenAI::Resources::Audio.new(client: self)
|
|
353
357
|
@moderations = OpenAI::Resources::Moderations.new(client: self)
|
|
354
358
|
@models = OpenAI::Resources::Models.new(client: self)
|
|
@@ -267,9 +267,13 @@ module OpenAI
|
|
|
267
267
|
# will use 'default'.
|
|
268
268
|
# - If set to 'default', then the request will be processed with the standard
|
|
269
269
|
# pricing and performance for the selected model.
|
|
270
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
271
|
-
#
|
|
272
|
-
#
|
|
270
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
271
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
272
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
273
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
274
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
275
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
276
|
+
# request.
|
|
273
277
|
# - When not set, the default behavior is 'auto'.
|
|
274
278
|
#
|
|
275
279
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1381,9 +1385,13 @@ module OpenAI
|
|
|
1381
1385
|
# will use 'default'.
|
|
1382
1386
|
# - If set to 'default', then the request will be processed with the standard
|
|
1383
1387
|
# pricing and performance for the selected model.
|
|
1384
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1385
|
-
#
|
|
1386
|
-
#
|
|
1388
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1389
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1390
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1391
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1392
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1393
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1394
|
+
# request.
|
|
1387
1395
|
# - When not set, the default behavior is 'auto'.
|
|
1388
1396
|
#
|
|
1389
1397
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1400,6 +1408,7 @@ module OpenAI
|
|
|
1400
1408
|
FLEX = :flex
|
|
1401
1409
|
SCALE = :scale
|
|
1402
1410
|
PRIORITY = :priority
|
|
1411
|
+
FAST = :fast
|
|
1403
1412
|
|
|
1404
1413
|
# @!method self.values
|
|
1405
1414
|
# @return [Array<Symbol>]
|
|
@@ -263,9 +263,13 @@ module OpenAI
|
|
|
263
263
|
# will use 'default'.
|
|
264
264
|
# - If set to 'default', then the request will be processed with the standard
|
|
265
265
|
# pricing and performance for the selected model.
|
|
266
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
267
|
-
#
|
|
268
|
-
#
|
|
266
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
267
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
268
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
269
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
270
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
271
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
272
|
+
# request.
|
|
269
273
|
# - When not set, the default behavior is 'auto'.
|
|
270
274
|
#
|
|
271
275
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1302,9 +1306,13 @@ module OpenAI
|
|
|
1302
1306
|
# will use 'default'.
|
|
1303
1307
|
# - If set to 'default', then the request will be processed with the standard
|
|
1304
1308
|
# pricing and performance for the selected model.
|
|
1305
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1306
|
-
#
|
|
1307
|
-
#
|
|
1309
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1310
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1311
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1312
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1313
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1314
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1315
|
+
# request.
|
|
1308
1316
|
# - When not set, the default behavior is 'auto'.
|
|
1309
1317
|
#
|
|
1310
1318
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1321,6 +1329,7 @@ module OpenAI
|
|
|
1321
1329
|
FLEX = :flex
|
|
1322
1330
|
SCALE = :scale
|
|
1323
1331
|
PRIORITY = :priority
|
|
1332
|
+
FAST = :fast
|
|
1324
1333
|
|
|
1325
1334
|
# @!method self.values
|
|
1326
1335
|
# @return [Array<Symbol>]
|
|
@@ -77,7 +77,21 @@ module OpenAI
|
|
|
77
77
|
nil?: true
|
|
78
78
|
|
|
79
79
|
# @!attribute service_tier
|
|
80
|
-
#
|
|
80
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
81
|
+
# then the request will be processed with the service tier configured in the
|
|
82
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
83
|
+
# If set to 'default', then the request will be processed with the standard
|
|
84
|
+
# pricing and performance for the selected model. - If set to
|
|
85
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
86
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
87
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
88
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
89
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
90
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
91
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
92
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
93
|
+
# actually used to serve the request. This response value may be different from
|
|
94
|
+
# the value set in the parameter.
|
|
81
95
|
#
|
|
82
96
|
# @return [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil]
|
|
83
97
|
optional :service_tier, enum: -> { OpenAI::Beta::ResponseCompactParams::ServiceTier }, nil?: true
|
|
@@ -105,7 +119,7 @@ module OpenAI
|
|
|
105
119
|
#
|
|
106
120
|
# @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheRetention, nil] How long to retain a prompt cache entry created by this request.
|
|
107
121
|
#
|
|
108
|
-
# @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil]
|
|
122
|
+
# @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] Specifies the processing type used for serving the request. - If set to 'auto'
|
|
109
123
|
#
|
|
110
124
|
# @param betas [Array<Symbol, OpenAI::Models::Beta::ResponseCompactParams::Beta>]
|
|
111
125
|
#
|
|
@@ -522,12 +536,27 @@ module OpenAI
|
|
|
522
536
|
# @return [Array<Symbol>]
|
|
523
537
|
end
|
|
524
538
|
|
|
525
|
-
#
|
|
539
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
540
|
+
# then the request will be processed with the service tier configured in the
|
|
541
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
542
|
+
# If set to 'default', then the request will be processed with the standard
|
|
543
|
+
# pricing and performance for the selected model. - If set to
|
|
544
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
545
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
546
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
547
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
548
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
549
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
550
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
551
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
552
|
+
# actually used to serve the request. This response value may be different from
|
|
553
|
+
# the value set in the parameter.
|
|
526
554
|
module ServiceTier
|
|
527
555
|
extend OpenAI::Internal::Type::Enum
|
|
528
556
|
|
|
529
557
|
AUTO = :auto
|
|
530
558
|
DEFAULT = :default
|
|
559
|
+
FAST = :fast
|
|
531
560
|
FLEX = :flex
|
|
532
561
|
PRIORITY = :priority
|
|
533
562
|
|
|
@@ -233,9 +233,13 @@ module OpenAI
|
|
|
233
233
|
# will use 'default'.
|
|
234
234
|
# - If set to 'default', then the request will be processed with the standard
|
|
235
235
|
# pricing and performance for the selected model.
|
|
236
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
237
|
-
#
|
|
238
|
-
#
|
|
236
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
237
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
238
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
239
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
240
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
241
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
242
|
+
# request.
|
|
239
243
|
# - When not set, the default behavior is 'auto'.
|
|
240
244
|
#
|
|
241
245
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1218,9 +1222,13 @@ module OpenAI
|
|
|
1218
1222
|
# will use 'default'.
|
|
1219
1223
|
# - If set to 'default', then the request will be processed with the standard
|
|
1220
1224
|
# pricing and performance for the selected model.
|
|
1221
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1222
|
-
#
|
|
1223
|
-
#
|
|
1225
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1226
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1227
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1228
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1229
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1230
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1231
|
+
# request.
|
|
1224
1232
|
# - When not set, the default behavior is 'auto'.
|
|
1225
1233
|
#
|
|
1226
1234
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1235,6 +1243,7 @@ module OpenAI
|
|
|
1235
1243
|
FLEX = :flex
|
|
1236
1244
|
SCALE = :scale
|
|
1237
1245
|
PRIORITY = :priority
|
|
1246
|
+
FAST = :fast
|
|
1238
1247
|
|
|
1239
1248
|
# @!method self.values
|
|
1240
1249
|
# @return [Array<Symbol>]
|
|
@@ -53,9 +53,13 @@ module OpenAI
|
|
|
53
53
|
# will use 'default'.
|
|
54
54
|
# - If set to 'default', then the request will be processed with the standard
|
|
55
55
|
# pricing and performance for the selected model.
|
|
56
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
57
|
-
#
|
|
58
|
-
#
|
|
56
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
57
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
58
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
59
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
60
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
61
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
62
|
+
# request.
|
|
59
63
|
# - When not set, the default behavior is 'auto'.
|
|
60
64
|
#
|
|
61
65
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -534,9 +538,13 @@ module OpenAI
|
|
|
534
538
|
# will use 'default'.
|
|
535
539
|
# - If set to 'default', then the request will be processed with the standard
|
|
536
540
|
# pricing and performance for the selected model.
|
|
537
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
538
|
-
#
|
|
539
|
-
#
|
|
541
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
542
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
543
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
544
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
545
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
546
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
547
|
+
# request.
|
|
540
548
|
# - When not set, the default behavior is 'auto'.
|
|
541
549
|
#
|
|
542
550
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -553,6 +561,7 @@ module OpenAI
|
|
|
553
561
|
FLEX = :flex
|
|
554
562
|
SCALE = :scale
|
|
555
563
|
PRIORITY = :priority
|
|
564
|
+
FAST = :fast
|
|
556
565
|
|
|
557
566
|
# @!method self.values
|
|
558
567
|
# @return [Array<Symbol>]
|
|
@@ -52,9 +52,13 @@ module OpenAI
|
|
|
52
52
|
# will use 'default'.
|
|
53
53
|
# - If set to 'default', then the request will be processed with the standard
|
|
54
54
|
# pricing and performance for the selected model.
|
|
55
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
56
|
-
#
|
|
57
|
-
#
|
|
55
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
56
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
57
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
58
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
59
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
60
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
61
|
+
# request.
|
|
58
62
|
# - When not set, the default behavior is 'auto'.
|
|
59
63
|
#
|
|
60
64
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -717,9 +721,13 @@ module OpenAI
|
|
|
717
721
|
# will use 'default'.
|
|
718
722
|
# - If set to 'default', then the request will be processed with the standard
|
|
719
723
|
# pricing and performance for the selected model.
|
|
720
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
721
|
-
#
|
|
722
|
-
#
|
|
724
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
725
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
726
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
727
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
728
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
729
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
730
|
+
# request.
|
|
723
731
|
# - When not set, the default behavior is 'auto'.
|
|
724
732
|
#
|
|
725
733
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -736,6 +744,7 @@ module OpenAI
|
|
|
736
744
|
FLEX = :flex
|
|
737
745
|
SCALE = :scale
|
|
738
746
|
PRIORITY = :priority
|
|
747
|
+
FAST = :fast
|
|
739
748
|
|
|
740
749
|
# @!method self.values
|
|
741
750
|
# @return [Array<Symbol>]
|
|
@@ -293,9 +293,13 @@ module OpenAI
|
|
|
293
293
|
# will use 'default'.
|
|
294
294
|
# - If set to 'default', then the request will be processed with the standard
|
|
295
295
|
# pricing and performance for the selected model.
|
|
296
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
297
|
-
#
|
|
298
|
-
#
|
|
296
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
297
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
298
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
299
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
300
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
301
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
302
|
+
# request.
|
|
299
303
|
# - When not set, the default behavior is 'auto'.
|
|
300
304
|
#
|
|
301
305
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -853,9 +857,13 @@ module OpenAI
|
|
|
853
857
|
# will use 'default'.
|
|
854
858
|
# - If set to 'default', then the request will be processed with the standard
|
|
855
859
|
# pricing and performance for the selected model.
|
|
856
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
857
|
-
#
|
|
858
|
-
#
|
|
860
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
861
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
862
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
863
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
864
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
865
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
866
|
+
# request.
|
|
859
867
|
# - When not set, the default behavior is 'auto'.
|
|
860
868
|
#
|
|
861
869
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -870,6 +878,7 @@ module OpenAI
|
|
|
870
878
|
FLEX = :flex
|
|
871
879
|
SCALE = :scale
|
|
872
880
|
PRIORITY = :priority
|
|
881
|
+
FAST = :fast
|
|
873
882
|
|
|
874
883
|
# @!method self.values
|
|
875
884
|
# @return [Array<Symbol>]
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
# @see OpenAI::Resources::ContentProvenanceChecks#create
|
|
6
|
+
class ContentProvenanceCheck < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute created_at
|
|
8
|
+
# The Unix timestamp, in seconds, when the provenance check was created.
|
|
9
|
+
#
|
|
10
|
+
# @return [Integer]
|
|
11
|
+
required :created_at, Integer
|
|
12
|
+
|
|
13
|
+
# @!attribute object
|
|
14
|
+
# The object type. Always `content_provenance_check` for this endpoint.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, OpenAI::Models::ContentProvenanceCheck::Object]
|
|
17
|
+
required :object, enum: -> { OpenAI::ContentProvenanceCheck::Object }
|
|
18
|
+
|
|
19
|
+
# @!attribute results
|
|
20
|
+
# The provenance results that apply to the uploaded file. Image results include
|
|
21
|
+
# C2PA and SynthID; audio results include SynthID.
|
|
22
|
+
#
|
|
23
|
+
# @return [Array<OpenAI::Models::ContentProvenanceCheck::Result::C2PA, OpenAI::Models::ContentProvenanceCheck::Result::SynthID>]
|
|
24
|
+
required :results, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::ContentProvenanceCheck::Result] }
|
|
25
|
+
|
|
26
|
+
# @!method initialize(created_at:, object:, results:)
|
|
27
|
+
# Some parameter documentations has been truncated, see
|
|
28
|
+
# {OpenAI::Models::ContentProvenanceCheck} for more details.
|
|
29
|
+
#
|
|
30
|
+
# @param created_at [Integer] The Unix timestamp, in seconds, when the provenance check was created.
|
|
31
|
+
#
|
|
32
|
+
# @param object [Symbol, OpenAI::Models::ContentProvenanceCheck::Object] The object type. Always `content_provenance_check` for this endpoint.
|
|
33
|
+
#
|
|
34
|
+
# @param results [Array<OpenAI::Models::ContentProvenanceCheck::Result::C2PA, OpenAI::Models::ContentProvenanceCheck::Result::SynthID>] The provenance results that apply to the uploaded file. Image results include C2
|
|
35
|
+
|
|
36
|
+
# The object type. Always `content_provenance_check` for this endpoint.
|
|
37
|
+
#
|
|
38
|
+
# @see OpenAI::Models::ContentProvenanceCheck#object
|
|
39
|
+
module Object
|
|
40
|
+
extend OpenAI::Internal::Type::Enum
|
|
41
|
+
|
|
42
|
+
CONTENT_PROVENANCE_CHECK = :content_provenance_check
|
|
43
|
+
|
|
44
|
+
# @!method self.values
|
|
45
|
+
# @return [Array<Symbol>]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
module Result
|
|
49
|
+
extend OpenAI::Internal::Type::Union
|
|
50
|
+
|
|
51
|
+
discriminator :type
|
|
52
|
+
|
|
53
|
+
variant :c2pa, -> { OpenAI::ContentProvenanceCheck::Result::C2PA }
|
|
54
|
+
|
|
55
|
+
variant :synthid, -> { OpenAI::ContentProvenanceCheck::Result::SynthID }
|
|
56
|
+
|
|
57
|
+
class C2PA < OpenAI::Internal::Type::BaseModel
|
|
58
|
+
# @!attribute generated_at
|
|
59
|
+
# The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
60
|
+
# was generated, when available.
|
|
61
|
+
#
|
|
62
|
+
# @return [String, nil]
|
|
63
|
+
required :generated_at, String, nil?: true
|
|
64
|
+
|
|
65
|
+
# @!attribute issuer
|
|
66
|
+
# The C2PA manifest issuer, when available.
|
|
67
|
+
#
|
|
68
|
+
# @return [String, nil]
|
|
69
|
+
required :issuer, String, nil?: true
|
|
70
|
+
|
|
71
|
+
# @!attribute model
|
|
72
|
+
# The OpenAI model recorded by the provenance signal, when available.
|
|
73
|
+
#
|
|
74
|
+
# @return [String, nil]
|
|
75
|
+
required :model, String, nil?: true
|
|
76
|
+
|
|
77
|
+
# @!attribute outcome
|
|
78
|
+
# Whether a supported OpenAI C2PA provenance signal was detected. If
|
|
79
|
+
# `not_detected`, it means the tool did not find supported signals in the uploaded
|
|
80
|
+
# file. The content could still have been generated by OpenAI if the metadata was
|
|
81
|
+
# stripped or has evidence of tampering, the watermark was degraded, it comes from
|
|
82
|
+
# a legacy generation model, or it was created before provenance signals were
|
|
83
|
+
# available. Content could also still be AI-generated by another company's model,
|
|
84
|
+
# which the tool currently does not detect.
|
|
85
|
+
#
|
|
86
|
+
# @return [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::Outcome]
|
|
87
|
+
required :outcome, enum: -> { OpenAI::ContentProvenanceCheck::Result::C2PA::Outcome }
|
|
88
|
+
|
|
89
|
+
# @!attribute type
|
|
90
|
+
# The provenance signal type. Always `c2pa`.
|
|
91
|
+
#
|
|
92
|
+
# @return [Symbol, :c2pa]
|
|
93
|
+
required :type, const: :c2pa
|
|
94
|
+
|
|
95
|
+
# @!attribute validation_state
|
|
96
|
+
# The validation status of the C2PA manifest in the uploaded image.
|
|
97
|
+
#
|
|
98
|
+
# @return [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::ValidationState]
|
|
99
|
+
required :validation_state, enum: -> { OpenAI::ContentProvenanceCheck::Result::C2PA::ValidationState }
|
|
100
|
+
|
|
101
|
+
# @!method initialize(generated_at:, issuer:, model:, outcome:, validation_state:, type: :c2pa)
|
|
102
|
+
# Some parameter documentations has been truncated, see
|
|
103
|
+
# {OpenAI::Models::ContentProvenanceCheck::Result::C2PA} for more details.
|
|
104
|
+
#
|
|
105
|
+
# @param generated_at [String, nil] The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
106
|
+
#
|
|
107
|
+
# @param issuer [String, nil] The C2PA manifest issuer, when available.
|
|
108
|
+
#
|
|
109
|
+
# @param model [String, nil] The OpenAI model recorded by the provenance signal, when available.
|
|
110
|
+
#
|
|
111
|
+
# @param outcome [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::Outcome] Whether a supported OpenAI C2PA provenance signal was detected.
|
|
112
|
+
#
|
|
113
|
+
# @param validation_state [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::C2PA::ValidationState] The validation status of the C2PA manifest in the uploaded image.
|
|
114
|
+
#
|
|
115
|
+
# @param type [Symbol, :c2pa] The provenance signal type. Always `c2pa`.
|
|
116
|
+
|
|
117
|
+
# Whether a supported OpenAI C2PA provenance signal was detected. If
|
|
118
|
+
# `not_detected`, it means the tool did not find supported signals in the uploaded
|
|
119
|
+
# file. The content could still have been generated by OpenAI if the metadata was
|
|
120
|
+
# stripped or has evidence of tampering, the watermark was degraded, it comes from
|
|
121
|
+
# a legacy generation model, or it was created before provenance signals were
|
|
122
|
+
# available. Content could also still be AI-generated by another company's model,
|
|
123
|
+
# which the tool currently does not detect.
|
|
124
|
+
#
|
|
125
|
+
# @see OpenAI::Models::ContentProvenanceCheck::Result::C2PA#outcome
|
|
126
|
+
module Outcome
|
|
127
|
+
extend OpenAI::Internal::Type::Enum
|
|
128
|
+
|
|
129
|
+
DETECTED = :detected
|
|
130
|
+
NOT_DETECTED = :not_detected
|
|
131
|
+
|
|
132
|
+
# @!method self.values
|
|
133
|
+
# @return [Array<Symbol>]
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# The validation status of the C2PA manifest in the uploaded image.
|
|
137
|
+
#
|
|
138
|
+
# @see OpenAI::Models::ContentProvenanceCheck::Result::C2PA#validation_state
|
|
139
|
+
module ValidationState
|
|
140
|
+
extend OpenAI::Internal::Type::Enum
|
|
141
|
+
|
|
142
|
+
TRUSTED = :trusted
|
|
143
|
+
VALID = :valid
|
|
144
|
+
INVALID = :invalid
|
|
145
|
+
NOT_PRESENT = :not_present
|
|
146
|
+
|
|
147
|
+
# @!method self.values
|
|
148
|
+
# @return [Array<Symbol>]
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
class SynthID < OpenAI::Internal::Type::BaseModel
|
|
153
|
+
# @!attribute generated_at
|
|
154
|
+
# The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
155
|
+
# was generated, when available.
|
|
156
|
+
#
|
|
157
|
+
# @return [String, nil]
|
|
158
|
+
required :generated_at, String, nil?: true
|
|
159
|
+
|
|
160
|
+
# @!attribute model
|
|
161
|
+
# The OpenAI model recorded by the provenance signal, when available.
|
|
162
|
+
#
|
|
163
|
+
# @return [String, nil]
|
|
164
|
+
required :model, String, nil?: true
|
|
165
|
+
|
|
166
|
+
# @!attribute outcome
|
|
167
|
+
# Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it
|
|
168
|
+
# means the tool did not find supported signals in the uploaded file. The content
|
|
169
|
+
# could still have been generated by OpenAI if the metadata was stripped or has
|
|
170
|
+
# evidence of tampering, the watermark was degraded, it comes from a legacy
|
|
171
|
+
# generation model, or it was created before provenance signals were available.
|
|
172
|
+
# Content could also still be AI-generated by another company's model, which the
|
|
173
|
+
# tool currently does not detect.
|
|
174
|
+
#
|
|
175
|
+
# @return [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::SynthID::Outcome]
|
|
176
|
+
required :outcome, enum: -> { OpenAI::ContentProvenanceCheck::Result::SynthID::Outcome }
|
|
177
|
+
|
|
178
|
+
# @!attribute type
|
|
179
|
+
# The provenance signal type. Always `synthid`.
|
|
180
|
+
#
|
|
181
|
+
# @return [Symbol, :synthid]
|
|
182
|
+
required :type, const: :synthid
|
|
183
|
+
|
|
184
|
+
# @!method initialize(generated_at:, model:, outcome:, type: :synthid)
|
|
185
|
+
# Some parameter documentations has been truncated, see
|
|
186
|
+
# {OpenAI::Models::ContentProvenanceCheck::Result::SynthID} for more details.
|
|
187
|
+
#
|
|
188
|
+
# @param generated_at [String, nil] The UTC RFC 3339 timestamp recorded by the provenance signal for when the asset
|
|
189
|
+
#
|
|
190
|
+
# @param model [String, nil] The OpenAI model recorded by the provenance signal, when available.
|
|
191
|
+
#
|
|
192
|
+
# @param outcome [Symbol, OpenAI::Models::ContentProvenanceCheck::Result::SynthID::Outcome] Whether a supported OpenAI SynthID watermark was detected.
|
|
193
|
+
#
|
|
194
|
+
# @param type [Symbol, :synthid] The provenance signal type. Always `synthid`.
|
|
195
|
+
|
|
196
|
+
# Whether a supported OpenAI SynthID watermark was detected. If `not_detected`, it
|
|
197
|
+
# means the tool did not find supported signals in the uploaded file. The content
|
|
198
|
+
# could still have been generated by OpenAI if the metadata was stripped or has
|
|
199
|
+
# evidence of tampering, the watermark was degraded, it comes from a legacy
|
|
200
|
+
# generation model, or it was created before provenance signals were available.
|
|
201
|
+
# Content could also still be AI-generated by another company's model, which the
|
|
202
|
+
# tool currently does not detect.
|
|
203
|
+
#
|
|
204
|
+
# @see OpenAI::Models::ContentProvenanceCheck::Result::SynthID#outcome
|
|
205
|
+
module Outcome
|
|
206
|
+
extend OpenAI::Internal::Type::Enum
|
|
207
|
+
|
|
208
|
+
DETECTED = :detected
|
|
209
|
+
NOT_DETECTED = :not_detected
|
|
210
|
+
|
|
211
|
+
# @!method self.values
|
|
212
|
+
# @return [Array<Symbol>]
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# @!method self.variants
|
|
217
|
+
# @return [Array(OpenAI::Models::ContentProvenanceCheck::Result::C2PA, OpenAI::Models::ContentProvenanceCheck::Result::SynthID)]
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
# @see OpenAI::Resources::ContentProvenanceChecks#create
|
|
6
|
+
class ContentProvenanceCheckCreateParams < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute file
|
|
11
|
+
# The image or audio file to check for supported OpenAI provenance signals.
|
|
12
|
+
#
|
|
13
|
+
# @return [Pathname, StringIO, IO, String, OpenAI::FilePart]
|
|
14
|
+
required :file, OpenAI::Internal::Type::FileInput
|
|
15
|
+
|
|
16
|
+
# @!method initialize(file:, request_options: {})
|
|
17
|
+
# @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The image or audio file to check for supported OpenAI provenance signals.
|
|
18
|
+
#
|
|
19
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|