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
|
@@ -275,9 +275,13 @@ module OpenAI
|
|
|
275
275
|
# will use 'default'.
|
|
276
276
|
# - If set to 'default', then the request will be processed with the standard
|
|
277
277
|
# pricing and performance for the selected model.
|
|
278
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
279
|
-
#
|
|
280
|
-
#
|
|
278
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
279
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
280
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
281
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
282
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
283
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
284
|
+
# request.
|
|
281
285
|
# - When not set, the default behavior is 'auto'.
|
|
282
286
|
#
|
|
283
287
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -613,9 +617,13 @@ module OpenAI
|
|
|
613
617
|
# will use 'default'.
|
|
614
618
|
# - If set to 'default', then the request will be processed with the standard
|
|
615
619
|
# pricing and performance for the selected model.
|
|
616
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
617
|
-
#
|
|
618
|
-
#
|
|
620
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
621
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
622
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
623
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
624
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
625
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
626
|
+
# request.
|
|
619
627
|
# - When not set, the default behavior is 'auto'.
|
|
620
628
|
#
|
|
621
629
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1559,9 +1567,13 @@ module OpenAI
|
|
|
1559
1567
|
# will use 'default'.
|
|
1560
1568
|
# - If set to 'default', then the request will be processed with the standard
|
|
1561
1569
|
# pricing and performance for the selected model.
|
|
1562
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1563
|
-
#
|
|
1564
|
-
#
|
|
1570
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1571
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1572
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1573
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1574
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1575
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1576
|
+
# request.
|
|
1565
1577
|
# - When not set, the default behavior is 'auto'.
|
|
1566
1578
|
#
|
|
1567
1579
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1596,6 +1608,8 @@ module OpenAI
|
|
|
1596
1608
|
:priority,
|
|
1597
1609
|
OpenAI::Responses::Response::ServiceTier::TaggedSymbol
|
|
1598
1610
|
)
|
|
1611
|
+
FAST =
|
|
1612
|
+
T.let(:fast, OpenAI::Responses::Response::ServiceTier::TaggedSymbol)
|
|
1599
1613
|
|
|
1600
1614
|
sig do
|
|
1601
1615
|
override.returns(
|
|
@@ -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,
|
|
@@ -278,9 +278,13 @@ module OpenAI
|
|
|
278
278
|
# will use 'default'.
|
|
279
279
|
# - If set to 'default', then the request will be processed with the standard
|
|
280
280
|
# pricing and performance for the selected model.
|
|
281
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
282
|
-
#
|
|
283
|
-
#
|
|
281
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
282
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
283
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
284
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
285
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
286
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
287
|
+
# request.
|
|
284
288
|
# - When not set, the default behavior is 'auto'.
|
|
285
289
|
#
|
|
286
290
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -731,9 +735,13 @@ module OpenAI
|
|
|
731
735
|
# will use 'default'.
|
|
732
736
|
# - If set to 'default', then the request will be processed with the standard
|
|
733
737
|
# pricing and performance for the selected model.
|
|
734
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
735
|
-
#
|
|
736
|
-
#
|
|
738
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
739
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
740
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
741
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
742
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
743
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
744
|
+
# request.
|
|
737
745
|
# - When not set, the default behavior is 'auto'.
|
|
738
746
|
#
|
|
739
747
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1528,9 +1536,13 @@ module OpenAI
|
|
|
1528
1536
|
# will use 'default'.
|
|
1529
1537
|
# - If set to 'default', then the request will be processed with the standard
|
|
1530
1538
|
# pricing and performance for the selected model.
|
|
1531
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1532
|
-
#
|
|
1533
|
-
#
|
|
1539
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1540
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1541
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1542
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1543
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1544
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1545
|
+
# request.
|
|
1534
1546
|
# - When not set, the default behavior is 'auto'.
|
|
1535
1547
|
#
|
|
1536
1548
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1574,6 +1586,11 @@ module OpenAI
|
|
|
1574
1586
|
:priority,
|
|
1575
1587
|
OpenAI::Responses::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
1576
1588
|
)
|
|
1589
|
+
FAST =
|
|
1590
|
+
T.let(
|
|
1591
|
+
:fast,
|
|
1592
|
+
OpenAI::Responses::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
1593
|
+
)
|
|
1577
1594
|
|
|
1578
1595
|
sig do
|
|
1579
1596
|
override.returns(
|
|
@@ -279,9 +279,13 @@ module OpenAI
|
|
|
279
279
|
# will use 'default'.
|
|
280
280
|
# - If set to 'default', then the request will be processed with the standard
|
|
281
281
|
# pricing and performance for the selected model.
|
|
282
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
283
|
-
#
|
|
284
|
-
#
|
|
282
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
283
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
284
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
285
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
286
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
287
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
288
|
+
# request.
|
|
285
289
|
# - When not set, the default behavior is 'auto'.
|
|
286
290
|
#
|
|
287
291
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -734,9 +738,13 @@ module OpenAI
|
|
|
734
738
|
# will use 'default'.
|
|
735
739
|
# - If set to 'default', then the request will be processed with the standard
|
|
736
740
|
# pricing and performance for the selected model.
|
|
737
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
738
|
-
#
|
|
739
|
-
#
|
|
741
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
742
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
743
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
744
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
745
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
746
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
747
|
+
# request.
|
|
740
748
|
# - When not set, the default behavior is 'auto'.
|
|
741
749
|
#
|
|
742
750
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1540,9 +1548,13 @@ module OpenAI
|
|
|
1540
1548
|
# will use 'default'.
|
|
1541
1549
|
# - If set to 'default', then the request will be processed with the standard
|
|
1542
1550
|
# pricing and performance for the selected model.
|
|
1543
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1544
|
-
#
|
|
1545
|
-
#
|
|
1551
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1552
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1553
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1554
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1555
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1556
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1557
|
+
# request.
|
|
1546
1558
|
# - When not set, the default behavior is 'auto'.
|
|
1547
1559
|
#
|
|
1548
1560
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1586,6 +1598,11 @@ module OpenAI
|
|
|
1586
1598
|
:priority,
|
|
1587
1599
|
OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol
|
|
1588
1600
|
)
|
|
1601
|
+
FAST =
|
|
1602
|
+
T.let(
|
|
1603
|
+
:fast,
|
|
1604
|
+
OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol
|
|
1605
|
+
)
|
|
1589
1606
|
|
|
1590
1607
|
sig do
|
|
1591
1608
|
override.returns(
|
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
|
|
@@ -262,9 +262,13 @@ module OpenAI
|
|
|
262
262
|
# will use 'default'.
|
|
263
263
|
# - If set to 'default', then the request will be processed with the standard
|
|
264
264
|
# pricing and performance for the selected model.
|
|
265
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
266
|
-
#
|
|
267
|
-
#
|
|
265
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
266
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
267
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
268
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
269
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
270
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
271
|
+
# request.
|
|
268
272
|
# - When not set, the default behavior is 'auto'.
|
|
269
273
|
#
|
|
270
274
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -605,9 +609,13 @@ module OpenAI
|
|
|
605
609
|
# will use 'default'.
|
|
606
610
|
# - If set to 'default', then the request will be processed with the standard
|
|
607
611
|
# pricing and performance for the selected model.
|
|
608
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
609
|
-
#
|
|
610
|
-
#
|
|
612
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
613
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
614
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
615
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
616
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
617
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
618
|
+
# request.
|
|
611
619
|
# - When not set, the default behavior is 'auto'.
|
|
612
620
|
#
|
|
613
621
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -885,7 +893,21 @@ module OpenAI
|
|
|
885
893
|
prompt_cache_options: nil,
|
|
886
894
|
# Body param: How long to retain a prompt cache entry created by this request.
|
|
887
895
|
prompt_cache_retention: nil,
|
|
888
|
-
# 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.
|
|
889
911
|
service_tier: nil,
|
|
890
912
|
# Header param: Optional beta features to enable for this request.
|
|
891
913
|
betas: nil,
|
|
@@ -302,9 +302,13 @@ module OpenAI
|
|
|
302
302
|
# will use 'default'.
|
|
303
303
|
# - If set to 'default', then the request will be processed with the standard
|
|
304
304
|
# pricing and performance for the selected model.
|
|
305
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
306
|
-
#
|
|
307
|
-
#
|
|
305
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
306
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
307
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
308
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
309
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
310
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
311
|
+
# request.
|
|
308
312
|
# - When not set, the default behavior is 'auto'.
|
|
309
313
|
#
|
|
310
314
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -666,9 +670,13 @@ module OpenAI
|
|
|
666
670
|
# will use 'default'.
|
|
667
671
|
# - If set to 'default', then the request will be processed with the standard
|
|
668
672
|
# pricing and performance for the selected model.
|
|
669
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
670
|
-
#
|
|
671
|
-
#
|
|
673
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
674
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
675
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
676
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
677
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
678
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
679
|
+
# request.
|
|
672
680
|
# - When not set, the default behavior is 'auto'.
|
|
673
681
|
#
|
|
674
682
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -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
|
|
@@ -259,9 +259,13 @@ module OpenAI
|
|
|
259
259
|
# will use 'default'.
|
|
260
260
|
# - If set to 'default', then the request will be processed with the standard
|
|
261
261
|
# pricing and performance for the selected model.
|
|
262
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
263
|
-
#
|
|
264
|
-
#
|
|
262
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
263
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
264
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
265
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
266
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
267
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
268
|
+
# request.
|
|
265
269
|
# - When not set, the default behavior is 'auto'.
|
|
266
270
|
#
|
|
267
271
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -595,9 +599,13 @@ module OpenAI
|
|
|
595
599
|
# will use 'default'.
|
|
596
600
|
# - If set to 'default', then the request will be processed with the standard
|
|
597
601
|
# pricing and performance for the selected model.
|
|
598
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
599
|
-
#
|
|
600
|
-
#
|
|
602
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
603
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
604
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
605
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
606
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
607
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
608
|
+
# request.
|
|
601
609
|
# - When not set, the default behavior is 'auto'.
|
|
602
610
|
#
|
|
603
611
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1104,7 +1112,21 @@ module OpenAI
|
|
|
1104
1112
|
prompt_cache_options: nil,
|
|
1105
1113
|
# How long to retain a prompt cache entry created by this request.
|
|
1106
1114
|
prompt_cache_retention: nil,
|
|
1107
|
-
#
|
|
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.
|
|
1108
1130
|
service_tier: nil,
|
|
1109
1131
|
request_options: {}
|
|
1110
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
|
|
@@ -826,7 +826,8 @@ module OpenAI
|
|
|
826
826
|
end
|
|
827
827
|
end
|
|
828
828
|
|
|
829
|
-
type service_tier =
|
|
829
|
+
type service_tier =
|
|
830
|
+
:auto | :default | :flex | :scale | :priority | :fast
|
|
830
831
|
|
|
831
832
|
module ServiceTier
|
|
832
833
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -836,6 +837,7 @@ module OpenAI
|
|
|
836
837
|
FLEX: :flex
|
|
837
838
|
SCALE: :scale
|
|
838
839
|
PRIORITY: :priority
|
|
840
|
+
FAST: :fast
|
|
839
841
|
|
|
840
842
|
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponse::service_tier]
|
|
841
843
|
end
|
|
@@ -727,7 +727,8 @@ module OpenAI
|
|
|
727
727
|
end
|
|
728
728
|
end
|
|
729
729
|
|
|
730
|
-
type service_tier =
|
|
730
|
+
type service_tier =
|
|
731
|
+
:auto | :default | :flex | :scale | :priority | :fast
|
|
731
732
|
|
|
732
733
|
module ServiceTier
|
|
733
734
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -737,6 +738,7 @@ module OpenAI
|
|
|
737
738
|
FLEX: :flex
|
|
738
739
|
SCALE: :scale
|
|
739
740
|
PRIORITY: :priority
|
|
741
|
+
FAST: :fast
|
|
740
742
|
|
|
741
743
|
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::service_tier]
|
|
742
744
|
end
|
|
@@ -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
|
|
|
@@ -720,7 +720,8 @@ module OpenAI
|
|
|
720
720
|
end
|
|
721
721
|
end
|
|
722
722
|
|
|
723
|
-
type service_tier =
|
|
723
|
+
type service_tier =
|
|
724
|
+
:auto | :default | :flex | :scale | :priority | :fast
|
|
724
725
|
|
|
725
726
|
module ServiceTier
|
|
726
727
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -730,6 +731,7 @@ module OpenAI
|
|
|
730
731
|
FLEX: :flex
|
|
731
732
|
SCALE: :scale
|
|
732
733
|
PRIORITY: :priority
|
|
734
|
+
FAST: :fast
|
|
733
735
|
|
|
734
736
|
def self?.values: -> ::Array[OpenAI::Models::Beta::ResponseCreateParams::service_tier]
|
|
735
737
|
end
|
|
@@ -370,7 +370,8 @@ module OpenAI
|
|
|
370
370
|
end
|
|
371
371
|
end
|
|
372
372
|
|
|
373
|
-
type service_tier =
|
|
373
|
+
type service_tier =
|
|
374
|
+
:auto | :default | :flex | :scale | :priority | :fast
|
|
374
375
|
|
|
375
376
|
module ServiceTier
|
|
376
377
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -380,6 +381,7 @@ module OpenAI
|
|
|
380
381
|
FLEX: :flex
|
|
381
382
|
SCALE: :scale
|
|
382
383
|
PRIORITY: :priority
|
|
384
|
+
FAST: :fast
|
|
383
385
|
|
|
384
386
|
def self?.values: -> ::Array[OpenAI::Models::Chat::ChatCompletion::service_tier]
|
|
385
387
|
end
|
|
@@ -515,7 +515,8 @@ module OpenAI
|
|
|
515
515
|
end
|
|
516
516
|
end
|
|
517
517
|
|
|
518
|
-
type service_tier =
|
|
518
|
+
type service_tier =
|
|
519
|
+
:auto | :default | :flex | :scale | :priority | :fast
|
|
519
520
|
|
|
520
521
|
module ServiceTier
|
|
521
522
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -525,6 +526,7 @@ module OpenAI
|
|
|
525
526
|
FLEX: :flex
|
|
526
527
|
SCALE: :scale
|
|
527
528
|
PRIORITY: :priority
|
|
529
|
+
FAST: :fast
|
|
528
530
|
|
|
529
531
|
def self?.values: -> ::Array[OpenAI::Models::Chat::ChatCompletionChunk::service_tier]
|
|
530
532
|
end
|
|
@@ -476,7 +476,8 @@ module OpenAI
|
|
|
476
476
|
def self?.variants: -> ::Array[OpenAI::Models::Chat::CompletionCreateParams::response_format]
|
|
477
477
|
end
|
|
478
478
|
|
|
479
|
-
type service_tier =
|
|
479
|
+
type service_tier =
|
|
480
|
+
:auto | :default | :flex | :scale | :priority | :fast
|
|
480
481
|
|
|
481
482
|
module ServiceTier
|
|
482
483
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -486,6 +487,7 @@ module OpenAI
|
|
|
486
487
|
FLEX: :flex
|
|
487
488
|
SCALE: :scale
|
|
488
489
|
PRIORITY: :priority
|
|
490
|
+
FAST: :fast
|
|
489
491
|
|
|
490
492
|
def self?.values: -> ::Array[OpenAI::Models::Chat::CompletionCreateParams::service_tier]
|
|
491
493
|
end
|