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
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,13 @@
|
|
|
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
|
+
|
|
3
11
|
## 0.74.0 (2026-07-30)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.73.0...v0.74.0](https://github.com/openai/openai-ruby/compare/v0.73.0...v0.74.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)
|
|
@@ -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
|
|
|
@@ -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
|
|
@@ -75,7 +75,21 @@ module OpenAI
|
|
|
75
75
|
nil?: true
|
|
76
76
|
|
|
77
77
|
# @!attribute service_tier
|
|
78
|
-
#
|
|
78
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
79
|
+
# then the request will be processed with the service tier configured in the
|
|
80
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
81
|
+
# If set to 'default', then the request will be processed with the standard
|
|
82
|
+
# pricing and performance for the selected model. - If set to
|
|
83
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
84
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
85
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
86
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
87
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
88
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
89
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
90
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
91
|
+
# actually used to serve the request. This response value may be different from
|
|
92
|
+
# the value set in the parameter.
|
|
79
93
|
#
|
|
80
94
|
# @return [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil]
|
|
81
95
|
optional :service_tier, enum: -> { OpenAI::Responses::ResponseCompactParams::ServiceTier }, nil?: true
|
|
@@ -98,7 +112,7 @@ module OpenAI
|
|
|
98
112
|
#
|
|
99
113
|
# @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheRetention, nil] How long to retain a prompt cache entry created by this request.
|
|
100
114
|
#
|
|
101
|
-
# @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil]
|
|
115
|
+
# @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil] Specifies the processing type used for serving the request. - If set to 'auto'
|
|
102
116
|
#
|
|
103
117
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
104
118
|
|
|
@@ -513,12 +527,27 @@ module OpenAI
|
|
|
513
527
|
# @return [Array<Symbol>]
|
|
514
528
|
end
|
|
515
529
|
|
|
516
|
-
#
|
|
530
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
531
|
+
# then the request will be processed with the service tier configured in the
|
|
532
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
533
|
+
# If set to 'default', then the request will be processed with the standard
|
|
534
|
+
# pricing and performance for the selected model. - If set to
|
|
535
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
536
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
537
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
538
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
539
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
540
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
541
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
542
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
543
|
+
# actually used to serve the request. This response value may be different from
|
|
544
|
+
# the value set in the parameter.
|
|
517
545
|
module ServiceTier
|
|
518
546
|
extend OpenAI::Internal::Type::Enum
|
|
519
547
|
|
|
520
548
|
AUTO = :auto
|
|
521
549
|
DEFAULT = :default
|
|
550
|
+
FAST = :fast
|
|
522
551
|
FLEX = :flex
|
|
523
552
|
PRIORITY = :priority
|
|
524
553
|
|
data/lib/openai/models.rb
CHANGED
|
@@ -95,6 +95,10 @@ module OpenAI
|
|
|
95
95
|
|
|
96
96
|
Containers = OpenAI::Models::Containers
|
|
97
97
|
|
|
98
|
+
ContentProvenanceCheck = OpenAI::Models::ContentProvenanceCheck
|
|
99
|
+
|
|
100
|
+
ContentProvenanceCheckCreateParams = OpenAI::Models::ContentProvenanceCheckCreateParams
|
|
101
|
+
|
|
98
102
|
Conversations = OpenAI::Models::Conversations
|
|
99
103
|
|
|
100
104
|
CreateEmbeddingResponse = OpenAI::Models::CreateEmbeddingResponse
|
|
@@ -403,7 +403,7 @@ module OpenAI
|
|
|
403
403
|
#
|
|
404
404
|
# @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheRetention, nil] Body param: How long to retain a prompt cache entry created by this request.
|
|
405
405
|
#
|
|
406
|
-
# @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] Body param:
|
|
406
|
+
# @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil] Body param: Specifies the processing type used for serving the request. - If s
|
|
407
407
|
#
|
|
408
408
|
# @param betas [Array<Symbol, OpenAI::Models::Beta::ResponseCompactParams::Beta>] Header param: Optional beta features to enable for this request.
|
|
409
409
|
#
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
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
|
+
#
|
|
16
|
+
# @overload create(file:, request_options: {})
|
|
17
|
+
#
|
|
18
|
+
# @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The image or audio file to check for supported OpenAI provenance signals.
|
|
19
|
+
#
|
|
20
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
21
|
+
#
|
|
22
|
+
# @return [OpenAI::Models::ContentProvenanceCheck]
|
|
23
|
+
#
|
|
24
|
+
# @see OpenAI::Models::ContentProvenanceCheckCreateParams
|
|
25
|
+
def create(params)
|
|
26
|
+
parsed, options = OpenAI::ContentProvenanceCheckCreateParams.dump_request(params)
|
|
27
|
+
@client.request(
|
|
28
|
+
method: :post,
|
|
29
|
+
path: "content_provenance_checks",
|
|
30
|
+
headers: {"content-type" => "multipart/form-data"},
|
|
31
|
+
body: parsed,
|
|
32
|
+
model: OpenAI::ContentProvenanceCheck,
|
|
33
|
+
security: {bearer_auth: true},
|
|
34
|
+
options: options
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @api private
|
|
39
|
+
#
|
|
40
|
+
# @param client [OpenAI::Client]
|
|
41
|
+
def initialize(client:)
|
|
42
|
+
@client = client
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -511,7 +511,7 @@ module OpenAI
|
|
|
511
511
|
#
|
|
512
512
|
# @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheRetention, nil] How long to retain a prompt cache entry created by this request.
|
|
513
513
|
#
|
|
514
|
-
# @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil]
|
|
514
|
+
# @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil] Specifies the processing type used for serving the request. - If set to 'auto'
|
|
515
515
|
#
|
|
516
516
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
517
517
|
#
|
data/lib/openai/version.rb
CHANGED
data/lib/openai.rb
CHANGED
|
@@ -656,6 +656,8 @@ require_relative "openai/models/containers/file_list_response"
|
|
|
656
656
|
require_relative "openai/models/containers/file_retrieve_params"
|
|
657
657
|
require_relative "openai/models/containers/file_retrieve_response"
|
|
658
658
|
require_relative "openai/models/containers/files/content_retrieve_params"
|
|
659
|
+
require_relative "openai/models/content_provenance_check"
|
|
660
|
+
require_relative "openai/models/content_provenance_check_create_params"
|
|
659
661
|
require_relative "openai/models/conversations/computer_screenshot_content"
|
|
660
662
|
require_relative "openai/models/conversations/conversation"
|
|
661
663
|
require_relative "openai/models/conversations/conversation_create_params"
|
|
@@ -1214,6 +1216,7 @@ require_relative "openai/resources/completions"
|
|
|
1214
1216
|
require_relative "openai/resources/containers"
|
|
1215
1217
|
require_relative "openai/resources/containers/files"
|
|
1216
1218
|
require_relative "openai/resources/containers/files/content"
|
|
1219
|
+
require_relative "openai/resources/content_provenance_checks"
|
|
1217
1220
|
require_relative "openai/resources/conversations"
|
|
1218
1221
|
require_relative "openai/resources/conversations/items"
|
|
1219
1222
|
require_relative "openai/resources/embeddings"
|
data/rbi/openai/client.rbi
CHANGED
|
@@ -47,6 +47,9 @@ module OpenAI
|
|
|
47
47
|
sig { returns(OpenAI::Resources::Images) }
|
|
48
48
|
attr_reader :images
|
|
49
49
|
|
|
50
|
+
sig { returns(OpenAI::Resources::ContentProvenanceChecks) }
|
|
51
|
+
attr_reader :content_provenance_checks
|
|
52
|
+
|
|
50
53
|
sig { returns(OpenAI::Resources::Audio) }
|
|
51
54
|
attr_reader :audio
|
|
52
55
|
|
|
@@ -94,7 +94,21 @@ module OpenAI
|
|
|
94
94
|
end
|
|
95
95
|
attr_accessor :prompt_cache_retention
|
|
96
96
|
|
|
97
|
-
#
|
|
97
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
98
|
+
# then the request will be processed with the service tier configured in the
|
|
99
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
100
|
+
# If set to 'default', then the request will be processed with the standard
|
|
101
|
+
# pricing and performance for the selected model. - If set to
|
|
102
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
103
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
104
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
105
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
106
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
107
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
108
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
109
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
110
|
+
# actually used to serve the request. This response value may be different from
|
|
111
|
+
# the value set in the parameter.
|
|
98
112
|
sig do
|
|
99
113
|
returns(
|
|
100
114
|
T.nilable(
|
|
@@ -184,7 +198,21 @@ module OpenAI
|
|
|
184
198
|
prompt_cache_options: nil,
|
|
185
199
|
# How long to retain a prompt cache entry created by this request.
|
|
186
200
|
prompt_cache_retention: nil,
|
|
187
|
-
#
|
|
201
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
202
|
+
# then the request will be processed with the service tier configured in the
|
|
203
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
204
|
+
# If set to 'default', then the request will be processed with the standard
|
|
205
|
+
# pricing and performance for the selected model. - If set to
|
|
206
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
207
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
208
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
209
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
210
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
211
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
212
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
213
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
214
|
+
# actually used to serve the request. This response value may be different from
|
|
215
|
+
# the value set in the parameter.
|
|
188
216
|
service_tier: nil,
|
|
189
217
|
betas: nil,
|
|
190
218
|
request_options: {}
|
|
@@ -962,7 +990,21 @@ module OpenAI
|
|
|
962
990
|
end
|
|
963
991
|
end
|
|
964
992
|
|
|
965
|
-
#
|
|
993
|
+
# Specifies the processing type used for serving the request. - If set to 'auto',
|
|
994
|
+
# then the request will be processed with the service tier configured in the
|
|
995
|
+
# Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
996
|
+
# If set to 'default', then the request will be processed with the standard
|
|
997
|
+
# pricing and performance for the selected model. - If set to
|
|
998
|
+
# '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
|
|
999
|
+
# request will be processed with the Flex Processing service tier. - To opt-in to
|
|
1000
|
+
# [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
1001
|
+
# `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
1002
|
+
# Completions. The response will show `service_tier=priority` regardless of if you
|
|
1003
|
+
# specify `service_tier=fast` or `priority` in your request. - When not set, the
|
|
1004
|
+
# default behavior is 'auto'. When the `service_tier` parameter is set, the
|
|
1005
|
+
# response body will include the `service_tier` value based on the processing mode
|
|
1006
|
+
# actually used to serve the request. This response value may be different from
|
|
1007
|
+
# the value set in the parameter.
|
|
966
1008
|
module ServiceTier
|
|
967
1009
|
extend OpenAI::Internal::Type::Enum
|
|
968
1010
|
|
|
@@ -982,6 +1024,11 @@ module OpenAI
|
|
|
982
1024
|
:default,
|
|
983
1025
|
OpenAI::Beta::ResponseCompactParams::ServiceTier::TaggedSymbol
|
|
984
1026
|
)
|
|
1027
|
+
FAST =
|
|
1028
|
+
T.let(
|
|
1029
|
+
:fast,
|
|
1030
|
+
OpenAI::Beta::ResponseCompactParams::ServiceTier::TaggedSymbol
|
|
1031
|
+
)
|
|
985
1032
|
FLEX =
|
|
986
1033
|
T.let(
|
|
987
1034
|
:flex,
|