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
|
@@ -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
|
|
@@ -904,9 +908,13 @@ module OpenAI
|
|
|
904
908
|
# will use 'default'.
|
|
905
909
|
# - If set to 'default', then the request will be processed with the standard
|
|
906
910
|
# pricing and performance for the selected model.
|
|
907
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
908
|
-
#
|
|
909
|
-
#
|
|
911
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
912
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
913
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
914
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
915
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
916
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
917
|
+
# request.
|
|
910
918
|
# - When not set, the default behavior is 'auto'.
|
|
911
919
|
#
|
|
912
920
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -923,6 +931,7 @@ module OpenAI
|
|
|
923
931
|
FLEX = :flex
|
|
924
932
|
SCALE = :scale
|
|
925
933
|
PRIORITY = :priority
|
|
934
|
+
FAST = :fast
|
|
926
935
|
|
|
927
936
|
# @!method self.values
|
|
928
937
|
# @return [Array<Symbol>]
|
|
@@ -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
|
|
|
@@ -231,9 +231,13 @@ module OpenAI
|
|
|
231
231
|
# will use 'default'.
|
|
232
232
|
# - If set to 'default', then the request will be processed with the standard
|
|
233
233
|
# pricing and performance for the selected model.
|
|
234
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
235
|
-
#
|
|
236
|
-
#
|
|
234
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
235
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
236
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
237
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
238
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
239
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
240
|
+
# request.
|
|
237
241
|
# - When not set, the default behavior is 'auto'.
|
|
238
242
|
#
|
|
239
243
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -694,9 +698,13 @@ module OpenAI
|
|
|
694
698
|
# will use 'default'.
|
|
695
699
|
# - If set to 'default', then the request will be processed with the standard
|
|
696
700
|
# pricing and performance for the selected model.
|
|
697
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
698
|
-
#
|
|
699
|
-
#
|
|
701
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
702
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
703
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
704
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
705
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
706
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
707
|
+
# request.
|
|
700
708
|
# - When not set, the default behavior is 'auto'.
|
|
701
709
|
#
|
|
702
710
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -711,6 +719,7 @@ module OpenAI
|
|
|
711
719
|
FLEX = :flex
|
|
712
720
|
SCALE = :scale
|
|
713
721
|
PRIORITY = :priority
|
|
722
|
+
FAST = :fast
|
|
714
723
|
|
|
715
724
|
# @!method self.values
|
|
716
725
|
# @return [Array<Symbol>]
|
|
@@ -231,9 +231,13 @@ module OpenAI
|
|
|
231
231
|
# will use 'default'.
|
|
232
232
|
# - If set to 'default', then the request will be processed with the standard
|
|
233
233
|
# pricing and performance for the selected model.
|
|
234
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
235
|
-
#
|
|
236
|
-
#
|
|
234
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
235
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
236
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
237
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
238
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
239
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
240
|
+
# request.
|
|
237
241
|
# - When not set, the default behavior is 'auto'.
|
|
238
242
|
#
|
|
239
243
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -709,9 +713,13 @@ module OpenAI
|
|
|
709
713
|
# will use 'default'.
|
|
710
714
|
# - If set to 'default', then the request will be processed with the standard
|
|
711
715
|
# pricing and performance for the selected model.
|
|
712
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
713
|
-
#
|
|
714
|
-
#
|
|
716
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
717
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
718
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
719
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
720
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
721
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
722
|
+
# request.
|
|
715
723
|
# - When not set, the default behavior is 'auto'.
|
|
716
724
|
#
|
|
717
725
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -728,6 +736,7 @@ module OpenAI
|
|
|
728
736
|
FLEX = :flex
|
|
729
737
|
SCALE = :scale
|
|
730
738
|
PRIORITY = :priority
|
|
739
|
+
FAST = :fast
|
|
731
740
|
|
|
732
741
|
# @!method self.values
|
|
733
742
|
# @return [Array<Symbol>]
|
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
|
|
|
@@ -277,9 +277,13 @@ module OpenAI
|
|
|
277
277
|
# will use 'default'.
|
|
278
278
|
# - If set to 'default', then the request will be processed with the standard
|
|
279
279
|
# pricing and performance for the selected model.
|
|
280
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
281
|
-
#
|
|
282
|
-
#
|
|
280
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
281
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
282
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
283
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
284
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
285
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
286
|
+
# request.
|
|
283
287
|
# - When not set, the default behavior is 'auto'.
|
|
284
288
|
#
|
|
285
289
|
# 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
|
|
@@ -2416,9 +2424,13 @@ module OpenAI
|
|
|
2416
2424
|
# will use 'default'.
|
|
2417
2425
|
# - If set to 'default', then the request will be processed with the standard
|
|
2418
2426
|
# pricing and performance for the selected model.
|
|
2419
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
2420
|
-
#
|
|
2421
|
-
#
|
|
2427
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
2428
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
2429
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
2430
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
2431
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2432
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2433
|
+
# request.
|
|
2422
2434
|
# - When not set, the default behavior is 'auto'.
|
|
2423
2435
|
#
|
|
2424
2436
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2450,6 +2462,8 @@ module OpenAI
|
|
|
2450
2462
|
:priority,
|
|
2451
2463
|
OpenAI::Beta::BetaResponse::ServiceTier::TaggedSymbol
|
|
2452
2464
|
)
|
|
2465
|
+
FAST =
|
|
2466
|
+
T.let(:fast, OpenAI::Beta::BetaResponse::ServiceTier::TaggedSymbol)
|
|
2453
2467
|
|
|
2454
2468
|
sig do
|
|
2455
2469
|
override.returns(
|
|
@@ -331,9 +331,13 @@ module OpenAI
|
|
|
331
331
|
# will use 'default'.
|
|
332
332
|
# - If set to 'default', then the request will be processed with the standard
|
|
333
333
|
# pricing and performance for the selected model.
|
|
334
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
335
|
-
#
|
|
336
|
-
#
|
|
334
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
335
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
336
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
337
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
338
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
339
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
340
|
+
# request.
|
|
337
341
|
# - When not set, the default behavior is 'auto'.
|
|
338
342
|
#
|
|
339
343
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -806,9 +810,13 @@ module OpenAI
|
|
|
806
810
|
# will use 'default'.
|
|
807
811
|
# - If set to 'default', then the request will be processed with the standard
|
|
808
812
|
# pricing and performance for the selected model.
|
|
809
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
810
|
-
#
|
|
811
|
-
#
|
|
813
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
814
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
815
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
816
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
817
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
818
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
819
|
+
# request.
|
|
812
820
|
# - When not set, the default behavior is 'auto'.
|
|
813
821
|
#
|
|
814
822
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2623,9 +2631,13 @@ module OpenAI
|
|
|
2623
2631
|
# will use 'default'.
|
|
2624
2632
|
# - If set to 'default', then the request will be processed with the standard
|
|
2625
2633
|
# pricing and performance for the selected model.
|
|
2626
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
2627
|
-
#
|
|
2628
|
-
#
|
|
2634
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
2635
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
2636
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
2637
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
2638
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2639
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2640
|
+
# request.
|
|
2629
2641
|
# - When not set, the default behavior is 'auto'.
|
|
2630
2642
|
#
|
|
2631
2643
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2669,6 +2681,11 @@ module OpenAI
|
|
|
2669
2681
|
:priority,
|
|
2670
2682
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
|
|
2671
2683
|
)
|
|
2684
|
+
FAST =
|
|
2685
|
+
T.let(
|
|
2686
|
+
:fast,
|
|
2687
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
|
|
2688
|
+
)
|
|
2672
2689
|
|
|
2673
2690
|
sig do
|
|
2674
2691
|
override.returns(
|
|
@@ -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,
|
|
@@ -280,9 +280,13 @@ module OpenAI
|
|
|
280
280
|
# will use 'default'.
|
|
281
281
|
# - If set to 'default', then the request will be processed with the standard
|
|
282
282
|
# pricing and performance for the selected model.
|
|
283
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
284
|
-
#
|
|
285
|
-
#
|
|
283
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
284
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
285
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
286
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
287
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
288
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
289
|
+
# request.
|
|
286
290
|
# - When not set, the default behavior is 'auto'.
|
|
287
291
|
#
|
|
288
292
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -738,9 +742,13 @@ module OpenAI
|
|
|
738
742
|
# will use 'default'.
|
|
739
743
|
# - If set to 'default', then the request will be processed with the standard
|
|
740
744
|
# pricing and performance for the selected model.
|
|
741
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
742
|
-
#
|
|
743
|
-
#
|
|
745
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
746
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
747
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
748
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
749
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
750
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
751
|
+
# request.
|
|
744
752
|
# - When not set, the default behavior is 'auto'.
|
|
745
753
|
#
|
|
746
754
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2524,9 +2532,13 @@ module OpenAI
|
|
|
2524
2532
|
# will use 'default'.
|
|
2525
2533
|
# - If set to 'default', then the request will be processed with the standard
|
|
2526
2534
|
# pricing and performance for the selected model.
|
|
2527
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
2528
|
-
#
|
|
2529
|
-
#
|
|
2535
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
2536
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
2537
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
2538
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
2539
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2540
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2541
|
+
# request.
|
|
2530
2542
|
# - When not set, the default behavior is 'auto'.
|
|
2531
2543
|
#
|
|
2532
2544
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2567,6 +2579,11 @@ module OpenAI
|
|
|
2567
2579
|
:priority,
|
|
2568
2580
|
OpenAI::Beta::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
2569
2581
|
)
|
|
2582
|
+
FAST =
|
|
2583
|
+
T.let(
|
|
2584
|
+
:fast,
|
|
2585
|
+
OpenAI::Beta::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
2586
|
+
)
|
|
2570
2587
|
|
|
2571
2588
|
sig do
|
|
2572
2589
|
override.returns(
|