openai 0.71.0 → 0.72.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 +10 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/organization_spend_limit.rb +151 -0
- data/lib/openai/models/admin/organization/organization_spend_limit_deleted.rb +33 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit.rb +155 -0
- data/lib/openai/models/admin/organization/projects/project_spend_limit_deleted.rb +35 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_delete_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_retrieve_params.rb +26 -0
- data/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb +77 -0
- data/lib/openai/models/admin/organization/spend_limit_delete_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_retrieve_params.rb +18 -0
- data/lib/openai/models/admin/organization/spend_limit_update_params.rb +67 -0
- data/lib/openai/models/beta/beta_response.rb +12 -6
- data/lib/openai/models/beta/beta_response_error.rb +1 -0
- data/lib/openai/models/beta/beta_response_text_config.rb +4 -2
- data/lib/openai/models/beta/beta_responses_client_event.rb +12 -6
- data/lib/openai/models/beta/response_create_params.rb +12 -6
- data/lib/openai/models/beta/responses/input_token_count_params.rb +12 -4
- data/lib/openai/models/chat/completion_create_params.rb +8 -6
- data/lib/openai/models/reasoning.rb +8 -2
- data/lib/openai/models/responses/input_token_count_params.rb +4 -2
- data/lib/openai/models/responses/response.rb +4 -4
- data/lib/openai/models/responses/response_create_params.rb +4 -4
- data/lib/openai/models/responses/response_error.rb +1 -0
- data/lib/openai/models/responses/response_text_config.rb +4 -2
- data/lib/openai/models/responses/responses_client_event.rb +4 -4
- data/lib/openai/resources/admin/organization/projects/spend_limit.rb +95 -0
- data/lib/openai/resources/admin/organization/projects.rb +4 -0
- data/lib/openai/resources/admin/organization/spend_limit.rb +86 -0
- data/lib/openai/resources/admin/organization.rb +4 -0
- data/lib/openai/resources/beta/responses.rb +4 -4
- data/lib/openai/resources/chat/completions.rb +4 -4
- data/lib/openai/resources/responses.rb +4 -4
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +12 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit.rbi +278 -0
- data/rbi/openai/models/admin/organization/organization_spend_limit_deleted.rbi +48 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit.rbi +280 -0
- data/rbi/openai/models/admin/organization/projects/project_spend_limit_deleted.rbi +49 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_delete_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbi +44 -0
- data/rbi/openai/models/admin/organization/projects/spend_limit_update_params.rbi +149 -0
- data/rbi/openai/models/admin/organization/spend_limit_delete_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_retrieve_params.rbi +34 -0
- data/rbi/openai/models/admin/organization/spend_limit_update_params.rbi +141 -0
- data/rbi/openai/models/beta/beta_response.rbi +18 -15
- data/rbi/openai/models/beta/beta_response_error.rbi +5 -0
- data/rbi/openai/models/beta/beta_response_text_config.rbi +6 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +18 -15
- data/rbi/openai/models/beta/response_create_params.rbi +18 -15
- data/rbi/openai/models/beta/responses/input_token_count_params.rbi +18 -6
- data/rbi/openai/models/chat/completion_create_params.rbi +12 -15
- data/rbi/openai/models/reasoning.rbi +12 -3
- data/rbi/openai/models/responses/input_token_count_params.rbi +6 -3
- data/rbi/openai/models/responses/response.rbi +6 -12
- data/rbi/openai/models/responses/response_create_params.rbi +6 -12
- data/rbi/openai/models/responses/response_error.rbi +5 -0
- data/rbi/openai/models/responses/response_text_config.rbi +6 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +6 -12
- data/rbi/openai/resources/admin/organization/projects/spend_limit.rbi +78 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +7 -0
- data/rbi/openai/resources/admin/organization/spend_limit.rbi +57 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -0
- data/rbi/openai/resources/beta/responses.rbi +4 -4
- data/rbi/openai/resources/chat/completions.rbi +8 -6
- data/rbi/openai/resources/responses.rbi +4 -4
- data/sig/openai/models/admin/organization/organization_spend_limit.rbs +94 -0
- data/sig/openai/models/admin/organization/organization_spend_limit_deleted.rbs +28 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +96 -0
- data/sig/openai/models/admin/organization/projects/project_spend_limit_deleted.rbs +30 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_delete_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbs +29 -0
- data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +67 -0
- data/sig/openai/models/admin/organization/spend_limit_delete_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_retrieve_params.rbs +19 -0
- data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +60 -0
- data/sig/openai/models/beta/beta_response.rbs +8 -12
- data/sig/openai/models/beta/beta_response_error.rbs +2 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +8 -12
- data/sig/openai/models/beta/response_create_params.rbs +8 -12
- data/sig/openai/models/chat/completion_create_params.rbs +8 -12
- data/sig/openai/models/responses/response.rbs +8 -12
- data/sig/openai/models/responses/response_create_params.rbs +8 -12
- data/sig/openai/models/responses/response_error.rbs +2 -0
- data/sig/openai/models/responses/responses_client_event.rbs +8 -12
- data/sig/openai/resources/admin/organization/projects/spend_limit.rbs +31 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -0
- data/sig/openai/resources/admin/organization/spend_limit.rbs +26 -0
- data/sig/openai/resources/admin/organization.rbs +2 -0
- data/sig/openai/resources/beta/responses.rbs +4 -4
- data/sig/openai/resources/chat/completions.rbs +4 -4
- data/sig/openai/resources/responses.rbs +4 -4
- metadata +38 -2
|
@@ -204,7 +204,7 @@ module OpenAI
|
|
|
204
204
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
205
205
|
#
|
|
206
206
|
# @return [String, nil]
|
|
207
|
-
optional :prompt_cache_key, String
|
|
207
|
+
optional :prompt_cache_key, String, nil?: true
|
|
208
208
|
|
|
209
209
|
# @!attribute prompt_cache_options
|
|
210
210
|
# The prompt-caching options that were applied to the response. Supported for
|
|
@@ -257,7 +257,7 @@ module OpenAI
|
|
|
257
257
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
258
258
|
#
|
|
259
259
|
# @return [String, nil]
|
|
260
|
-
optional :safety_identifier, String
|
|
260
|
+
optional :safety_identifier, String, nil?: true
|
|
261
261
|
|
|
262
262
|
# @!attribute service_tier
|
|
263
263
|
# Specifies the processing type used for serving the request.
|
|
@@ -382,7 +382,7 @@ module OpenAI
|
|
|
382
382
|
#
|
|
383
383
|
# @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
384
384
|
#
|
|
385
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
385
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
386
386
|
#
|
|
387
387
|
# @param prompt_cache_options [OpenAI::Models::Beta::BetaResponse::PromptCacheOptions] The prompt-caching options that were applied to the response. Supported for `gpt
|
|
388
388
|
#
|
|
@@ -390,7 +390,7 @@ module OpenAI
|
|
|
390
390
|
#
|
|
391
391
|
# @param reasoning [OpenAI::Models::Beta::BetaResponse::Reasoning, nil] **gpt-5 and o-series models only**
|
|
392
392
|
#
|
|
393
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
393
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
394
394
|
#
|
|
395
395
|
# @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponse::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
396
396
|
#
|
|
@@ -1190,7 +1190,10 @@ module OpenAI
|
|
|
1190
1190
|
# @see OpenAI::Models::Beta::BetaResponse#reasoning
|
|
1191
1191
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1192
1192
|
# @!attribute context
|
|
1193
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1193
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1194
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1195
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1196
|
+
#
|
|
1194
1197
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1195
1198
|
# for the response.
|
|
1196
1199
|
#
|
|
@@ -1260,7 +1263,10 @@ module OpenAI
|
|
|
1260
1263
|
#
|
|
1261
1264
|
# @param summary [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
1262
1265
|
|
|
1263
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1266
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1267
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1268
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1269
|
+
#
|
|
1264
1270
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1265
1271
|
# for the response.
|
|
1266
1272
|
#
|
|
@@ -35,6 +35,7 @@ module OpenAI
|
|
|
35
35
|
SERVER_ERROR = :server_error
|
|
36
36
|
RATE_LIMIT_EXCEEDED = :rate_limit_exceeded
|
|
37
37
|
INVALID_PROMPT = :invalid_prompt
|
|
38
|
+
DATA_RESIDENCY_MISMATCH = :data_residency_mismatch
|
|
38
39
|
BIO_POLICY = :bio_policy
|
|
39
40
|
VECTOR_STORE_TIMEOUT = :vector_store_timeout
|
|
40
41
|
INVALID_IMAGE = :invalid_image
|
|
@@ -25,7 +25,8 @@ module OpenAI
|
|
|
25
25
|
# @!attribute verbosity
|
|
26
26
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
27
27
|
# more concise responses, while higher values will result in more verbose
|
|
28
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
28
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
29
|
+
# default is `medium`.
|
|
29
30
|
#
|
|
30
31
|
# @return [Symbol, OpenAI::Models::Beta::BetaResponseTextConfig::Verbosity, nil]
|
|
31
32
|
optional :verbosity, enum: -> { OpenAI::Beta::BetaResponseTextConfig::Verbosity }, nil?: true
|
|
@@ -46,7 +47,8 @@ module OpenAI
|
|
|
46
47
|
|
|
47
48
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
48
49
|
# more concise responses, while higher values will result in more verbose
|
|
49
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
50
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
51
|
+
# default is `medium`.
|
|
50
52
|
#
|
|
51
53
|
# @see OpenAI::Models::Beta::BetaResponseTextConfig#verbosity
|
|
52
54
|
module Verbosity
|
|
@@ -188,7 +188,7 @@ module OpenAI
|
|
|
188
188
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
189
189
|
#
|
|
190
190
|
# @return [String, nil]
|
|
191
|
-
optional :prompt_cache_key, String
|
|
191
|
+
optional :prompt_cache_key, String, nil?: true
|
|
192
192
|
|
|
193
193
|
# @!attribute prompt_cache_options
|
|
194
194
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -253,7 +253,7 @@ module OpenAI
|
|
|
253
253
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
254
254
|
#
|
|
255
255
|
# @return [String, nil]
|
|
256
|
-
optional :safety_identifier, String
|
|
256
|
+
optional :safety_identifier, String, nil?: true
|
|
257
257
|
|
|
258
258
|
# @!attribute service_tier
|
|
259
259
|
# Specifies the processing type used for serving the request.
|
|
@@ -443,7 +443,7 @@ module OpenAI
|
|
|
443
443
|
#
|
|
444
444
|
# @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
445
445
|
#
|
|
446
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
446
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
447
447
|
#
|
|
448
448
|
# @param prompt_cache_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
449
449
|
#
|
|
@@ -451,7 +451,7 @@ module OpenAI
|
|
|
451
451
|
#
|
|
452
452
|
# @param reasoning [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning, nil] **gpt-5 and o-series models only**
|
|
453
453
|
#
|
|
454
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
454
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
455
455
|
#
|
|
456
456
|
# @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
457
457
|
#
|
|
@@ -1102,7 +1102,10 @@ module OpenAI
|
|
|
1102
1102
|
# @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#reasoning
|
|
1103
1103
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1104
1104
|
# @!attribute context
|
|
1105
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1105
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1106
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1107
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1108
|
+
#
|
|
1106
1109
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1107
1110
|
# for the response.
|
|
1108
1111
|
#
|
|
@@ -1181,7 +1184,10 @@ module OpenAI
|
|
|
1181
1184
|
#
|
|
1182
1185
|
# @param summary [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
1183
1186
|
|
|
1184
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1187
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1188
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1189
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1190
|
+
#
|
|
1185
1191
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1186
1192
|
# for the response.
|
|
1187
1193
|
#
|
|
@@ -163,7 +163,7 @@ module OpenAI
|
|
|
163
163
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
164
164
|
#
|
|
165
165
|
# @return [String, nil]
|
|
166
|
-
optional :prompt_cache_key, String
|
|
166
|
+
optional :prompt_cache_key, String, nil?: true
|
|
167
167
|
|
|
168
168
|
# @!attribute prompt_cache_options
|
|
169
169
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -223,7 +223,7 @@ module OpenAI
|
|
|
223
223
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
224
224
|
#
|
|
225
225
|
# @return [String, nil]
|
|
226
|
-
optional :safety_identifier, String
|
|
226
|
+
optional :safety_identifier, String, nil?: true
|
|
227
227
|
|
|
228
228
|
# @!attribute service_tier
|
|
229
229
|
# Specifies the processing type used for serving the request.
|
|
@@ -392,7 +392,7 @@ module OpenAI
|
|
|
392
392
|
#
|
|
393
393
|
# @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
394
394
|
#
|
|
395
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
395
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
396
396
|
#
|
|
397
397
|
# @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
398
398
|
#
|
|
@@ -400,7 +400,7 @@ module OpenAI
|
|
|
400
400
|
#
|
|
401
401
|
# @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] **gpt-5 and o-series models only**
|
|
402
402
|
#
|
|
403
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
403
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
404
404
|
#
|
|
405
405
|
# @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
406
406
|
#
|
|
@@ -1027,7 +1027,10 @@ module OpenAI
|
|
|
1027
1027
|
|
|
1028
1028
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1029
1029
|
# @!attribute context
|
|
1030
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1030
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1031
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1032
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1033
|
+
#
|
|
1031
1034
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1032
1035
|
# for the response.
|
|
1033
1036
|
#
|
|
@@ -1097,7 +1100,10 @@ module OpenAI
|
|
|
1097
1100
|
#
|
|
1098
1101
|
# @param summary [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
1099
1102
|
|
|
1100
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
1103
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
1104
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
1105
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
1106
|
+
#
|
|
1101
1107
|
# When returned on a response, this is the effective reasoning context mode used
|
|
1102
1108
|
# for the response.
|
|
1103
1109
|
#
|
|
@@ -214,7 +214,10 @@ module OpenAI
|
|
|
214
214
|
|
|
215
215
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
216
216
|
# @!attribute context
|
|
217
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
217
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
218
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
219
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
220
|
+
#
|
|
218
221
|
# When returned on a response, this is the effective reasoning context mode used
|
|
219
222
|
# for the response.
|
|
220
223
|
#
|
|
@@ -289,7 +292,10 @@ module OpenAI
|
|
|
289
292
|
#
|
|
290
293
|
# @param summary [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
291
294
|
|
|
292
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
295
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
296
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
297
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
298
|
+
#
|
|
293
299
|
# When returned on a response, this is the effective reasoning context mode used
|
|
294
300
|
# for the response.
|
|
295
301
|
#
|
|
@@ -419,7 +425,8 @@ module OpenAI
|
|
|
419
425
|
# @!attribute verbosity
|
|
420
426
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
421
427
|
# more concise responses, while higher values will result in more verbose
|
|
422
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
428
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
429
|
+
# default is `medium`.
|
|
423
430
|
#
|
|
424
431
|
# @return [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::Verbosity, nil]
|
|
425
432
|
optional :verbosity,
|
|
@@ -442,7 +449,8 @@ module OpenAI
|
|
|
442
449
|
|
|
443
450
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
444
451
|
# more concise responses, while higher values will result in more verbose
|
|
445
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
452
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
453
|
+
# default is `medium`.
|
|
446
454
|
#
|
|
447
455
|
# @see OpenAI::Models::Beta::Responses::InputTokenCountParams::Text#verbosity
|
|
448
456
|
module Verbosity
|
|
@@ -194,7 +194,7 @@ module OpenAI
|
|
|
194
194
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
195
195
|
#
|
|
196
196
|
# @return [String, nil]
|
|
197
|
-
optional :prompt_cache_key, String
|
|
197
|
+
optional :prompt_cache_key, String, nil?: true
|
|
198
198
|
|
|
199
199
|
# @!attribute prompt_cache_options
|
|
200
200
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -271,7 +271,7 @@ module OpenAI
|
|
|
271
271
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
272
272
|
#
|
|
273
273
|
# @return [String, nil]
|
|
274
|
-
optional :safety_identifier, String
|
|
274
|
+
optional :safety_identifier, String, nil?: true
|
|
275
275
|
|
|
276
276
|
# @!attribute seed
|
|
277
277
|
# @deprecated
|
|
@@ -401,7 +401,8 @@ module OpenAI
|
|
|
401
401
|
# @!attribute verbosity
|
|
402
402
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
403
403
|
# more concise responses, while higher values will result in more verbose
|
|
404
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
404
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
405
|
+
# default is `medium`.
|
|
405
406
|
#
|
|
406
407
|
# @return [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil]
|
|
407
408
|
optional :verbosity, enum: -> { OpenAI::Chat::CompletionCreateParams::Verbosity }, nil?: true
|
|
@@ -452,7 +453,7 @@ module OpenAI
|
|
|
452
453
|
#
|
|
453
454
|
# @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
454
455
|
#
|
|
455
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
456
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
456
457
|
#
|
|
457
458
|
# @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
458
459
|
#
|
|
@@ -462,7 +463,7 @@ module OpenAI
|
|
|
462
463
|
#
|
|
463
464
|
# @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output.
|
|
464
465
|
#
|
|
465
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
466
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
466
467
|
#
|
|
467
468
|
# @param seed [Integer, nil] This feature is in Beta.
|
|
468
469
|
#
|
|
@@ -894,7 +895,8 @@ module OpenAI
|
|
|
894
895
|
|
|
895
896
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
896
897
|
# more concise responses, while higher values will result in more verbose
|
|
897
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
898
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
899
|
+
# default is `medium`.
|
|
898
900
|
module Verbosity
|
|
899
901
|
extend OpenAI::Internal::Type::Enum
|
|
900
902
|
|
|
@@ -4,7 +4,10 @@ module OpenAI
|
|
|
4
4
|
module Models
|
|
5
5
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute context
|
|
7
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
7
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
8
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
9
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
10
|
+
#
|
|
8
11
|
# When returned on a response, this is the effective reasoning context mode used
|
|
9
12
|
# for the response.
|
|
10
13
|
#
|
|
@@ -72,7 +75,10 @@ module OpenAI
|
|
|
72
75
|
#
|
|
73
76
|
# @param summary [Symbol, OpenAI::Models::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
74
77
|
|
|
75
|
-
# Controls which reasoning items are rendered back to the model on later turns.
|
|
78
|
+
# Controls which reasoning items are rendered back to the model on later turns. If
|
|
79
|
+
# omitted or set to `auto`, the model determines the context mode. The `gpt-5.6`
|
|
80
|
+
# model family defaults to `all_turns`; earlier models default to `current_turn`.
|
|
81
|
+
#
|
|
76
82
|
# When returned on a response, this is the effective reasoning context mode used
|
|
77
83
|
# for the response.
|
|
78
84
|
#
|
|
@@ -225,7 +225,8 @@ module OpenAI
|
|
|
225
225
|
# @!attribute verbosity
|
|
226
226
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
227
227
|
# more concise responses, while higher values will result in more verbose
|
|
228
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
228
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
229
|
+
# default is `medium`.
|
|
229
230
|
#
|
|
230
231
|
# @return [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Text::Verbosity, nil]
|
|
231
232
|
optional :verbosity,
|
|
@@ -250,7 +251,8 @@ module OpenAI
|
|
|
250
251
|
|
|
251
252
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
252
253
|
# more concise responses, while higher values will result in more verbose
|
|
253
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
254
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
255
|
+
# default is `medium`.
|
|
254
256
|
#
|
|
255
257
|
# @see OpenAI::Models::Responses::InputTokenCountParams::Text#verbosity
|
|
256
258
|
module Verbosity
|
|
@@ -204,7 +204,7 @@ module OpenAI
|
|
|
204
204
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
205
205
|
#
|
|
206
206
|
# @return [String, nil]
|
|
207
|
-
optional :prompt_cache_key, String
|
|
207
|
+
optional :prompt_cache_key, String, nil?: true
|
|
208
208
|
|
|
209
209
|
# @!attribute prompt_cache_options
|
|
210
210
|
# The prompt-caching options that were applied to the response. Supported for
|
|
@@ -257,7 +257,7 @@ module OpenAI
|
|
|
257
257
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
258
258
|
#
|
|
259
259
|
# @return [String, nil]
|
|
260
|
-
optional :safety_identifier, String
|
|
260
|
+
optional :safety_identifier, String, nil?: true
|
|
261
261
|
|
|
262
262
|
# @!attribute service_tier
|
|
263
263
|
# Specifies the processing type used for serving the request.
|
|
@@ -402,7 +402,7 @@ module OpenAI
|
|
|
402
402
|
#
|
|
403
403
|
# @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
404
404
|
#
|
|
405
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
405
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
406
406
|
#
|
|
407
407
|
# @param prompt_cache_options [OpenAI::Models::Responses::Response::PromptCacheOptions] The prompt-caching options that were applied to the response. Supported for `gpt
|
|
408
408
|
#
|
|
@@ -410,7 +410,7 @@ module OpenAI
|
|
|
410
410
|
#
|
|
411
411
|
# @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only**
|
|
412
412
|
#
|
|
413
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
413
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
414
414
|
#
|
|
415
415
|
# @param service_tier [Symbol, OpenAI::Models::Responses::Response::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
416
416
|
#
|
|
@@ -161,7 +161,7 @@ module OpenAI
|
|
|
161
161
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
162
162
|
#
|
|
163
163
|
# @return [String, nil]
|
|
164
|
-
optional :prompt_cache_key, String
|
|
164
|
+
optional :prompt_cache_key, String, nil?: true
|
|
165
165
|
|
|
166
166
|
# @!attribute prompt_cache_options
|
|
167
167
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -221,7 +221,7 @@ module OpenAI
|
|
|
221
221
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
222
222
|
#
|
|
223
223
|
# @return [String, nil]
|
|
224
|
-
optional :safety_identifier, String
|
|
224
|
+
optional :safety_identifier, String, nil?: true
|
|
225
225
|
|
|
226
226
|
# @!attribute service_tier
|
|
227
227
|
# Specifies the processing type used for serving the request.
|
|
@@ -389,7 +389,7 @@ module OpenAI
|
|
|
389
389
|
#
|
|
390
390
|
# @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
391
391
|
#
|
|
392
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
392
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
393
393
|
#
|
|
394
394
|
# @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
395
395
|
#
|
|
@@ -397,7 +397,7 @@ module OpenAI
|
|
|
397
397
|
#
|
|
398
398
|
# @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only**
|
|
399
399
|
#
|
|
400
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
400
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
401
401
|
#
|
|
402
402
|
# @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
403
403
|
#
|
|
@@ -35,6 +35,7 @@ module OpenAI
|
|
|
35
35
|
SERVER_ERROR = :server_error
|
|
36
36
|
RATE_LIMIT_EXCEEDED = :rate_limit_exceeded
|
|
37
37
|
INVALID_PROMPT = :invalid_prompt
|
|
38
|
+
DATA_RESIDENCY_MISMATCH = :data_residency_mismatch
|
|
38
39
|
BIO_POLICY = :bio_policy
|
|
39
40
|
VECTOR_STORE_TIMEOUT = :vector_store_timeout
|
|
40
41
|
INVALID_IMAGE = :invalid_image
|
|
@@ -25,7 +25,8 @@ module OpenAI
|
|
|
25
25
|
# @!attribute verbosity
|
|
26
26
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
27
27
|
# more concise responses, while higher values will result in more verbose
|
|
28
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
28
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
29
|
+
# default is `medium`.
|
|
29
30
|
#
|
|
30
31
|
# @return [Symbol, OpenAI::Models::Responses::ResponseTextConfig::Verbosity, nil]
|
|
31
32
|
optional :verbosity, enum: -> { OpenAI::Responses::ResponseTextConfig::Verbosity }, nil?: true
|
|
@@ -46,7 +47,8 @@ module OpenAI
|
|
|
46
47
|
|
|
47
48
|
# Constrains the verbosity of the model's response. Lower values will result in
|
|
48
49
|
# more concise responses, while higher values will result in more verbose
|
|
49
|
-
# responses. Currently supported values are `low`, `medium`, and `high`.
|
|
50
|
+
# responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
51
|
+
# default is `medium`.
|
|
50
52
|
#
|
|
51
53
|
# @see OpenAI::Models::Responses::ResponseTextConfig#verbosity
|
|
52
54
|
module Verbosity
|
|
@@ -161,7 +161,7 @@ module OpenAI
|
|
|
161
161
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
162
162
|
#
|
|
163
163
|
# @return [String, nil]
|
|
164
|
-
optional :prompt_cache_key, String
|
|
164
|
+
optional :prompt_cache_key, String, nil?: true
|
|
165
165
|
|
|
166
166
|
# @!attribute prompt_cache_options
|
|
167
167
|
# Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
@@ -221,7 +221,7 @@ module OpenAI
|
|
|
221
221
|
# [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
222
222
|
#
|
|
223
223
|
# @return [String, nil]
|
|
224
|
-
optional :safety_identifier, String
|
|
224
|
+
optional :safety_identifier, String, nil?: true
|
|
225
225
|
|
|
226
226
|
# @!attribute service_tier
|
|
227
227
|
# Specifies the processing type used for serving the request.
|
|
@@ -394,7 +394,7 @@ module OpenAI
|
|
|
394
394
|
#
|
|
395
395
|
# @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables.
|
|
396
396
|
#
|
|
397
|
-
# @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
397
|
+
# @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi
|
|
398
398
|
#
|
|
399
399
|
# @param prompt_cache_options [OpenAI::Models::Responses::ResponsesClientEvent::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default
|
|
400
400
|
#
|
|
@@ -402,7 +402,7 @@ module OpenAI
|
|
|
402
402
|
#
|
|
403
403
|
# @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only**
|
|
404
404
|
#
|
|
405
|
-
# @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi
|
|
405
|
+
# @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi
|
|
406
406
|
#
|
|
407
407
|
# @param service_tier [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ServiceTier, nil] Specifies the processing type used for serving the request.
|
|
408
408
|
#
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Resources
|
|
5
|
+
class Admin
|
|
6
|
+
class Organization
|
|
7
|
+
class Projects
|
|
8
|
+
class SpendLimit
|
|
9
|
+
# Get a project's hard spend limit.
|
|
10
|
+
#
|
|
11
|
+
# @overload retrieve(project_id, request_options: {})
|
|
12
|
+
#
|
|
13
|
+
# @param project_id [String] The ID of the project whose hard spend limit is being managed.
|
|
14
|
+
#
|
|
15
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
16
|
+
#
|
|
17
|
+
# @return [OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit]
|
|
18
|
+
#
|
|
19
|
+
# @see OpenAI::Models::Admin::Organization::Projects::SpendLimitRetrieveParams
|
|
20
|
+
def retrieve(project_id, params = {})
|
|
21
|
+
@client.request(
|
|
22
|
+
method: :get,
|
|
23
|
+
path: ["organization/projects/%1$s/spend_limit", project_id],
|
|
24
|
+
model: OpenAI::Admin::Organization::Projects::ProjectSpendLimit,
|
|
25
|
+
security: {admin_api_key_auth: true},
|
|
26
|
+
options: params[:request_options]
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Some parameter documentations has been truncated, see
|
|
31
|
+
# {OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams} for more
|
|
32
|
+
# details.
|
|
33
|
+
#
|
|
34
|
+
# Create or replace a project's hard spend limit.
|
|
35
|
+
#
|
|
36
|
+
# @overload update(project_id, currency:, interval:, threshold_amount:, request_options: {})
|
|
37
|
+
#
|
|
38
|
+
# @param project_id [String] The ID of the project whose hard spend limit is being managed.
|
|
39
|
+
#
|
|
40
|
+
# @param currency [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Currency] The currency for the threshold amount. Currently, only `USD` is supported.
|
|
41
|
+
#
|
|
42
|
+
# @param interval [Symbol, OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams::Interval] The time interval for evaluating spend against the threshold. Currently, only `m
|
|
43
|
+
#
|
|
44
|
+
# @param threshold_amount [Integer] The hard spend limit amount, in cents.
|
|
45
|
+
#
|
|
46
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
47
|
+
#
|
|
48
|
+
# @return [OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimit]
|
|
49
|
+
#
|
|
50
|
+
# @see OpenAI::Models::Admin::Organization::Projects::SpendLimitUpdateParams
|
|
51
|
+
def update(project_id, params)
|
|
52
|
+
parsed, options = OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams.dump_request(params)
|
|
53
|
+
@client.request(
|
|
54
|
+
method: :post,
|
|
55
|
+
path: ["organization/projects/%1$s/spend_limit", project_id],
|
|
56
|
+
body: parsed,
|
|
57
|
+
model: OpenAI::Admin::Organization::Projects::ProjectSpendLimit,
|
|
58
|
+
security: {admin_api_key_auth: true},
|
|
59
|
+
options: options
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Delete a project's hard spend limit.
|
|
64
|
+
#
|
|
65
|
+
# @overload delete(project_id, request_options: {})
|
|
66
|
+
#
|
|
67
|
+
# @param project_id [String] The ID of the project whose hard spend limit is being managed.
|
|
68
|
+
#
|
|
69
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
70
|
+
#
|
|
71
|
+
# @return [OpenAI::Models::Admin::Organization::Projects::ProjectSpendLimitDeleted]
|
|
72
|
+
#
|
|
73
|
+
# @see OpenAI::Models::Admin::Organization::Projects::SpendLimitDeleteParams
|
|
74
|
+
def delete(project_id, params = {})
|
|
75
|
+
@client.request(
|
|
76
|
+
method: :delete,
|
|
77
|
+
path: ["organization/projects/%1$s/spend_limit", project_id],
|
|
78
|
+
model: OpenAI::Admin::Organization::Projects::ProjectSpendLimitDeleted,
|
|
79
|
+
security: {admin_api_key_auth: true},
|
|
80
|
+
options: params[:request_options]
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# @api private
|
|
85
|
+
#
|
|
86
|
+
# @param client [OpenAI::Client]
|
|
87
|
+
def initialize(client:)
|
|
88
|
+
@client = client
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -32,6 +32,9 @@ module OpenAI
|
|
|
32
32
|
# @return [OpenAI::Resources::Admin::Organization::Projects::DataRetention]
|
|
33
33
|
attr_reader :data_retention
|
|
34
34
|
|
|
35
|
+
# @return [OpenAI::Resources::Admin::Organization::Projects::SpendLimit]
|
|
36
|
+
attr_reader :spend_limit
|
|
37
|
+
|
|
35
38
|
# @return [OpenAI::Resources::Admin::Organization::Projects::SpendAlerts]
|
|
36
39
|
attr_reader :spend_alerts
|
|
37
40
|
|
|
@@ -189,6 +192,7 @@ module OpenAI
|
|
|
189
192
|
@groups = OpenAI::Resources::Admin::Organization::Projects::Groups.new(client: client)
|
|
190
193
|
@roles = OpenAI::Resources::Admin::Organization::Projects::Roles.new(client: client)
|
|
191
194
|
@data_retention = OpenAI::Resources::Admin::Organization::Projects::DataRetention.new(client: client)
|
|
195
|
+
@spend_limit = OpenAI::Resources::Admin::Organization::Projects::SpendLimit.new(client: client)
|
|
192
196
|
@spend_alerts = OpenAI::Resources::Admin::Organization::Projects::SpendAlerts.new(client: client)
|
|
193
197
|
@certificates = OpenAI::Resources::Admin::Organization::Projects::Certificates.new(client: client)
|
|
194
198
|
end
|