openai 0.117.0 → 0.118.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 +13 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/projects/project_optional_service_tier.rb +24 -0
- data/lib/openai/models/admin/organization/projects/project_service_tier_settings.rb +88 -0
- data/lib/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rb +29 -0
- data/lib/openai/models/admin/organization/projects/service_tier_setting_update_params.rb +92 -0
- data/lib/openai/models/beta/beta_response.rb +1 -0
- data/lib/openai/models/beta/beta_response_usage.rb +33 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +10 -9
- data/lib/openai/models/beta/response_compact_params.rb +3 -3
- data/lib/openai/models/beta/response_create_params.rb +10 -9
- data/lib/openai/models/chat/completion_create_params.rb +3 -3
- data/lib/openai/models/responses/response.rb +1 -0
- data/lib/openai/models/responses/response_compact_params.rb +3 -3
- data/lib/openai/models/responses/response_create_params.rb +10 -9
- data/lib/openai/models/responses/response_usage.rb +33 -1
- data/lib/openai/models/responses/responses_client_event.rb +10 -9
- data/lib/openai/resources/admin/organization/projects/service_tier_settings.rb +77 -0
- data/lib/openai/resources/admin/organization/projects.rb +6 -0
- data/lib/openai/resources/beta/responses.rb +6 -6
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/responses.rb +3 -3
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +5 -0
- data/rbi/openai/models/admin/organization/projects/project_optional_service_tier.rbi +45 -0
- data/rbi/openai/models/admin/organization/projects/project_service_tier_settings.rbi +143 -0
- data/rbi/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbi +63 -0
- data/rbi/openai/models/admin/organization/projects/service_tier_setting_update_params.rbi +183 -0
- data/rbi/openai/models/beta/beta_response.rbi +1 -0
- data/rbi/openai/models/beta/beta_response_usage.rbi +66 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +13 -9
- data/rbi/openai/models/beta/response_compact_params.rbi +3 -3
- data/rbi/openai/models/beta/response_create_params.rbi +10 -9
- data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
- data/rbi/openai/models/responses/response.rbi +1 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +3 -3
- data/rbi/openai/models/responses/response_create_params.rbi +10 -9
- data/rbi/openai/models/responses/response_usage.rbi +66 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +13 -9
- data/rbi/openai/resources/admin/organization/projects/service_tier_settings.rbi +67 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +3 -0
- data/rbi/openai/resources/beta/responses.rbi +6 -6
- data/rbi/openai/resources/chat/completions.rbi +2 -2
- data/rbi/openai/resources/responses.rbi +3 -3
- data/sig/openai/models/admin/organization/projects/project_optional_service_tier.rbs +23 -0
- data/sig/openai/models/admin/organization/projects/project_service_tier_settings.rbs +72 -0
- data/sig/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbs +32 -0
- data/sig/openai/models/admin/organization/projects/service_tier_setting_update_params.rbs +91 -0
- data/sig/openai/models/beta/beta_response.rbs +2 -1
- data/sig/openai/models/beta/beta_response_usage.rbs +40 -3
- data/sig/openai/models/beta/beta_responses_client_event.rbs +11 -10
- data/sig/openai/models/beta/response_compact_params.rbs +2 -2
- data/sig/openai/models/beta/response_create_params.rbs +11 -10
- data/sig/openai/models/chat/completion_create_params.rbs +3 -3
- data/sig/openai/models/responses/response.rbs +2 -1
- data/sig/openai/models/responses/response_compact_params.rbs +2 -2
- data/sig/openai/models/responses/response_create_params.rbs +11 -10
- data/sig/openai/models/responses/response_usage.rbs +40 -3
- data/sig/openai/models/responses/responses_client_event.rbs +11 -10
- data/sig/openai/resources/admin/organization/projects/service_tier_settings.rbs +25 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -0
- metadata +16 -1
|
@@ -202,7 +202,7 @@ module OpenAI
|
|
|
202
202
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
203
203
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
204
204
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
205
|
-
# `ttl` defaults to `30m
|
|
205
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
206
206
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
207
207
|
# for current details.
|
|
208
208
|
attr_reader prompt_cache_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions?
|
|
@@ -213,7 +213,7 @@ module OpenAI
|
|
|
213
213
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
214
214
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
215
215
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
216
|
-
# `ttl` defaults to `30m
|
|
216
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
217
217
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
218
218
|
# for current details.
|
|
219
219
|
def prompt_cache_options=: (
|
|
@@ -523,7 +523,7 @@ module OpenAI
|
|
|
523
523
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
524
524
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
525
525
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
526
|
-
# `ttl` defaults to `30m
|
|
526
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
527
527
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
528
528
|
# for current details.
|
|
529
529
|
# @param prompt_cache_retention
|
|
@@ -1268,13 +1268,13 @@ module OpenAI
|
|
|
1268
1268
|
def prewarm=: (bool) -> bool
|
|
1269
1269
|
|
|
1270
1270
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1271
|
-
# written by the request.
|
|
1272
|
-
#
|
|
1271
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1272
|
+
# backend may retain cache entries for longer.
|
|
1273
1273
|
attr_reader ttl: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl?
|
|
1274
1274
|
|
|
1275
1275
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1276
|
-
# written by the request.
|
|
1277
|
-
#
|
|
1276
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1277
|
+
# backend may retain cache entries for longer.
|
|
1278
1278
|
def ttl=: (
|
|
1279
1279
|
OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl
|
|
1280
1280
|
) -> OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl
|
|
@@ -1294,8 +1294,8 @@ module OpenAI
|
|
|
1294
1294
|
# set to `true`, overrides the `generate` field to `false`.
|
|
1295
1295
|
# @param ttl
|
|
1296
1296
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1297
|
-
# written by the request.
|
|
1298
|
-
#
|
|
1297
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1298
|
+
# backend may retain cache entries for longer.
|
|
1299
1299
|
def initialize: (
|
|
1300
1300
|
?comparison_response_id: String?,
|
|
1301
1301
|
?mode: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode,
|
|
@@ -1321,12 +1321,13 @@ module OpenAI
|
|
|
1321
1321
|
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode]
|
|
1322
1322
|
end
|
|
1323
1323
|
|
|
1324
|
-
type ttl = :"30m"
|
|
1324
|
+
type ttl = :"30m" | :"12h"
|
|
1325
1325
|
|
|
1326
1326
|
module Ttl
|
|
1327
1327
|
extend OpenAI::Internal::Type::Enum
|
|
1328
1328
|
|
|
1329
1329
|
TTL_30M: :"30m"
|
|
1330
|
+
TTL_12H: :"12h"
|
|
1330
1331
|
|
|
1331
1332
|
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl]
|
|
1332
1333
|
end
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
51
51
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
52
52
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
53
|
-
# `ttl` defaults to `30m
|
|
53
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
54
54
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
55
55
|
# for current details.
|
|
56
56
|
attr_accessor prompt_cache_options: OpenAI::Beta::ResponseCompactParams::PromptCacheOptions?
|
|
@@ -109,7 +109,7 @@ module OpenAI
|
|
|
109
109
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
110
110
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
111
111
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
112
|
-
# `ttl` defaults to `30m
|
|
112
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
113
113
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
114
114
|
# for current details.
|
|
115
115
|
# @param prompt_cache_retention
|
|
@@ -180,7 +180,7 @@ module OpenAI
|
|
|
180
180
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
181
181
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
182
182
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
183
|
-
# `ttl` defaults to `30m
|
|
183
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
184
184
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
185
185
|
# for current details.
|
|
186
186
|
attr_reader prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions?
|
|
@@ -191,7 +191,7 @@ module OpenAI
|
|
|
191
191
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
192
192
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
193
193
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
194
|
-
# `ttl` defaults to `30m
|
|
194
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
195
195
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
196
196
|
# for current details.
|
|
197
197
|
def prompt_cache_options=: (
|
|
@@ -483,7 +483,7 @@ module OpenAI
|
|
|
483
483
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
484
484
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
485
485
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
486
|
-
# `ttl` defaults to `30m
|
|
486
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
487
487
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
488
488
|
# for current details.
|
|
489
489
|
# @param prompt_cache_retention
|
|
@@ -1204,13 +1204,13 @@ module OpenAI
|
|
|
1204
1204
|
def prewarm=: (bool) -> bool
|
|
1205
1205
|
|
|
1206
1206
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1207
|
-
# written by the request.
|
|
1208
|
-
#
|
|
1207
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1208
|
+
# backend may retain cache entries for longer.
|
|
1209
1209
|
attr_reader ttl: OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::ttl?
|
|
1210
1210
|
|
|
1211
1211
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1212
|
-
# written by the request.
|
|
1213
|
-
#
|
|
1212
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1213
|
+
# backend may retain cache entries for longer.
|
|
1214
1214
|
def ttl=: (
|
|
1215
1215
|
OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::ttl
|
|
1216
1216
|
) -> OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::ttl
|
|
@@ -1230,8 +1230,8 @@ module OpenAI
|
|
|
1230
1230
|
# set to `true`, overrides the `generate` field to `false`.
|
|
1231
1231
|
# @param ttl
|
|
1232
1232
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1233
|
-
# written by the request.
|
|
1234
|
-
#
|
|
1233
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1234
|
+
# backend may retain cache entries for longer.
|
|
1235
1235
|
def initialize: (
|
|
1236
1236
|
?comparison_response_id: String?,
|
|
1237
1237
|
?mode: OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::mode,
|
|
@@ -1257,12 +1257,13 @@ module OpenAI
|
|
|
1257
1257
|
def self?.values: -> ::Array[OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::mode]
|
|
1258
1258
|
end
|
|
1259
1259
|
|
|
1260
|
-
type ttl = :"30m"
|
|
1260
|
+
type ttl = :"30m" | :"12h"
|
|
1261
1261
|
|
|
1262
1262
|
module Ttl
|
|
1263
1263
|
extend OpenAI::Internal::Type::Enum
|
|
1264
1264
|
|
|
1265
1265
|
TTL_30M: :"30m"
|
|
1266
|
+
TTL_12H: :"12h"
|
|
1266
1267
|
|
|
1267
1268
|
def self?.values: -> ::Array[OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::ttl]
|
|
1268
1269
|
end
|
|
@@ -207,7 +207,7 @@ module OpenAI
|
|
|
207
207
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
208
208
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
209
209
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
210
|
-
# `ttl` defaults to `30m
|
|
210
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
211
211
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
212
212
|
# for current details.
|
|
213
213
|
attr_reader prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions?
|
|
@@ -218,7 +218,7 @@ module OpenAI
|
|
|
218
218
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
219
219
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
220
220
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
221
|
-
# `ttl` defaults to `30m
|
|
221
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
222
222
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
223
223
|
# for current details.
|
|
224
224
|
def prompt_cache_options=: (
|
|
@@ -537,7 +537,7 @@ module OpenAI
|
|
|
537
537
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
538
538
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
539
539
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
540
|
-
# `ttl` defaults to `30m
|
|
540
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
541
541
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
542
542
|
# for current details.
|
|
543
543
|
# @param prompt_cache_retention
|
|
@@ -1182,12 +1182,13 @@ module OpenAI
|
|
|
1182
1182
|
def self?.values: -> ::Array[OpenAI::Models::Responses::Response::PromptCacheOptions::mode]
|
|
1183
1183
|
end
|
|
1184
1184
|
|
|
1185
|
-
type ttl = :"30m"
|
|
1185
|
+
type ttl = :"30m" | :"12h"
|
|
1186
1186
|
|
|
1187
1187
|
module Ttl
|
|
1188
1188
|
extend OpenAI::Internal::Type::Enum
|
|
1189
1189
|
|
|
1190
1190
|
TTL_30M: :"30m"
|
|
1191
|
+
TTL_12H: :"12h"
|
|
1191
1192
|
|
|
1192
1193
|
def self?.values: -> ::Array[OpenAI::Models::Responses::Response::PromptCacheOptions::ttl]
|
|
1193
1194
|
end
|
|
@@ -49,7 +49,7 @@ module OpenAI
|
|
|
49
49
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
50
50
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
51
51
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
52
|
-
# `ttl` defaults to `30m
|
|
52
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
53
53
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
54
54
|
# for current details.
|
|
55
55
|
attr_accessor prompt_cache_options: OpenAI::Responses::ResponseCompactParams::PromptCacheOptions?
|
|
@@ -102,7 +102,7 @@ module OpenAI
|
|
|
102
102
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
103
103
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
104
104
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
105
|
-
# `ttl` defaults to `30m
|
|
105
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
106
106
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
107
107
|
# for current details.
|
|
108
108
|
# @param prompt_cache_retention
|
|
@@ -175,7 +175,7 @@ module OpenAI
|
|
|
175
175
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
176
176
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
177
177
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
178
|
-
# `ttl` defaults to `30m
|
|
178
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
179
179
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
180
180
|
# for current details.
|
|
181
181
|
attr_reader prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions?
|
|
@@ -186,7 +186,7 @@ module OpenAI
|
|
|
186
186
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
187
187
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
188
188
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
189
|
-
# `ttl` defaults to `30m
|
|
189
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
190
190
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
191
191
|
# for current details.
|
|
192
192
|
def prompt_cache_options=: (
|
|
@@ -470,7 +470,7 @@ module OpenAI
|
|
|
470
470
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
471
471
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
472
472
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
473
|
-
# `ttl` defaults to `30m
|
|
473
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
474
474
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
475
475
|
# for current details.
|
|
476
476
|
# @param prompt_cache_retention
|
|
@@ -919,13 +919,13 @@ module OpenAI
|
|
|
919
919
|
def prewarm=: (bool) -> bool
|
|
920
920
|
|
|
921
921
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
922
|
-
# written by the request.
|
|
923
|
-
#
|
|
922
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
923
|
+
# backend may retain cache entries for longer.
|
|
924
924
|
attr_reader ttl: OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::ttl?
|
|
925
925
|
|
|
926
926
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
927
|
-
# written by the request.
|
|
928
|
-
#
|
|
927
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
928
|
+
# backend may retain cache entries for longer.
|
|
929
929
|
def ttl=: (
|
|
930
930
|
OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::ttl
|
|
931
931
|
) -> OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::ttl
|
|
@@ -945,8 +945,8 @@ module OpenAI
|
|
|
945
945
|
# set to `true`, overrides the `generate` field to `false`.
|
|
946
946
|
# @param ttl
|
|
947
947
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
948
|
-
# written by the request.
|
|
949
|
-
#
|
|
948
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
949
|
+
# backend may retain cache entries for longer.
|
|
950
950
|
def initialize: (
|
|
951
951
|
?comparison_response_id: String?,
|
|
952
952
|
?mode: OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::mode,
|
|
@@ -972,12 +972,13 @@ module OpenAI
|
|
|
972
972
|
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::mode]
|
|
973
973
|
end
|
|
974
974
|
|
|
975
|
-
type ttl = :"30m"
|
|
975
|
+
type ttl = :"30m" | :"12h"
|
|
976
976
|
|
|
977
977
|
module Ttl
|
|
978
978
|
extend OpenAI::Internal::Type::Enum
|
|
979
979
|
|
|
980
980
|
TTL_30M: :"30m"
|
|
981
|
+
TTL_12H: :"12h"
|
|
981
982
|
|
|
982
983
|
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::ttl]
|
|
983
984
|
end
|
|
@@ -53,7 +53,11 @@ module OpenAI
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
type input_tokens_details =
|
|
56
|
-
{
|
|
56
|
+
{
|
|
57
|
+
cache_write_tokens: Integer,
|
|
58
|
+
cached_tokens: Integer,
|
|
59
|
+
?cache_write_tokens_details: OpenAI::Responses::ResponseUsage::InputTokensDetails::CacheWriteTokensDetails
|
|
60
|
+
}
|
|
57
61
|
|
|
58
62
|
class InputTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
59
63
|
# The number of input tokens that were written to the cache.
|
|
@@ -63,6 +67,12 @@ module OpenAI
|
|
|
63
67
|
# [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
64
68
|
attr_accessor cached_tokens: Integer
|
|
65
69
|
|
|
70
|
+
attr_reader cache_write_tokens_details: OpenAI::Responses::ResponseUsage::InputTokensDetails::CacheWriteTokensDetails?
|
|
71
|
+
|
|
72
|
+
def cache_write_tokens_details=: (
|
|
73
|
+
OpenAI::Responses::ResponseUsage::InputTokensDetails::CacheWriteTokensDetails
|
|
74
|
+
) -> OpenAI::Responses::ResponseUsage::InputTokensDetails::CacheWriteTokensDetails
|
|
75
|
+
|
|
66
76
|
# @param cache_write_tokens
|
|
67
77
|
# The number of input tokens that were written to the cache.
|
|
68
78
|
# @param cached_tokens
|
|
@@ -70,13 +80,40 @@ module OpenAI
|
|
|
70
80
|
# [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
71
81
|
def initialize: (
|
|
72
82
|
cache_write_tokens: Integer,
|
|
73
|
-
cached_tokens: Integer
|
|
83
|
+
cached_tokens: Integer,
|
|
84
|
+
?cache_write_tokens_details: OpenAI::Responses::ResponseUsage::InputTokensDetails::CacheWriteTokensDetails
|
|
74
85
|
) -> void
|
|
75
86
|
|
|
76
87
|
def to_hash: -> {
|
|
77
88
|
cache_write_tokens: Integer,
|
|
78
|
-
cached_tokens: Integer
|
|
89
|
+
cached_tokens: Integer,
|
|
90
|
+
?cache_write_tokens_details: OpenAI::Responses::ResponseUsage::InputTokensDetails::CacheWriteTokensDetails
|
|
79
91
|
}
|
|
92
|
+
|
|
93
|
+
type cache_write_tokens_details =
|
|
94
|
+
{ :ttl_12h_tokens => Integer, :ttl_30m_tokens => Integer }
|
|
95
|
+
|
|
96
|
+
class CacheWriteTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
97
|
+
# The number of input tokens written with 12-hour retention.
|
|
98
|
+
attr_accessor ttl_12h_tokens: Integer
|
|
99
|
+
|
|
100
|
+
# The number of input tokens written with 30-minute retention.
|
|
101
|
+
attr_accessor ttl_30m_tokens: Integer
|
|
102
|
+
|
|
103
|
+
# @param ttl_12h_tokens
|
|
104
|
+
# The number of input tokens written with 12-hour retention.
|
|
105
|
+
# @param ttl_30m_tokens
|
|
106
|
+
# The number of input tokens written with 30-minute retention.
|
|
107
|
+
def initialize: (
|
|
108
|
+
ttl_12h_tokens: Integer,
|
|
109
|
+
ttl_30m_tokens: Integer
|
|
110
|
+
) -> void
|
|
111
|
+
|
|
112
|
+
def to_hash: -> {
|
|
113
|
+
:ttl_12h_tokens => Integer,
|
|
114
|
+
:ttl_30m_tokens => Integer
|
|
115
|
+
}
|
|
116
|
+
end
|
|
80
117
|
end
|
|
81
118
|
|
|
82
119
|
type output_tokens_details = { reasoning_tokens: Integer }
|
|
@@ -195,7 +195,7 @@ module OpenAI
|
|
|
195
195
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
196
196
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
197
197
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
198
|
-
# `ttl` defaults to `30m
|
|
198
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
199
199
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
200
200
|
# for current details.
|
|
201
201
|
attr_reader prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions?
|
|
@@ -206,7 +206,7 @@ module OpenAI
|
|
|
206
206
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
207
207
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
208
208
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
209
|
-
# `ttl` defaults to `30m
|
|
209
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
210
210
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
211
211
|
# for current details.
|
|
212
212
|
def prompt_cache_options=: (
|
|
@@ -514,7 +514,7 @@ module OpenAI
|
|
|
514
514
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
515
515
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
516
516
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
517
|
-
# `ttl` defaults to `30m
|
|
517
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
518
518
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
519
519
|
# for current details.
|
|
520
520
|
# @param prompt_cache_retention
|
|
@@ -984,13 +984,13 @@ module OpenAI
|
|
|
984
984
|
def prewarm=: (bool) -> bool
|
|
985
985
|
|
|
986
986
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
987
|
-
# written by the request.
|
|
988
|
-
#
|
|
987
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
988
|
+
# backend may retain cache entries for longer.
|
|
989
989
|
attr_reader ttl: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl?
|
|
990
990
|
|
|
991
991
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
992
|
-
# written by the request.
|
|
993
|
-
#
|
|
992
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
993
|
+
# backend may retain cache entries for longer.
|
|
994
994
|
def ttl=: (
|
|
995
995
|
OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl
|
|
996
996
|
) -> OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl
|
|
@@ -1010,8 +1010,8 @@ module OpenAI
|
|
|
1010
1010
|
# set to `true`, overrides the `generate` field to `false`.
|
|
1011
1011
|
# @param ttl
|
|
1012
1012
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1013
|
-
# written by the request.
|
|
1014
|
-
#
|
|
1013
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1014
|
+
# backend may retain cache entries for longer.
|
|
1015
1015
|
def initialize: (
|
|
1016
1016
|
?comparison_response_id: String?,
|
|
1017
1017
|
?mode: OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode,
|
|
@@ -1037,12 +1037,13 @@ module OpenAI
|
|
|
1037
1037
|
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::mode]
|
|
1038
1038
|
end
|
|
1039
1039
|
|
|
1040
|
-
type ttl = :"30m"
|
|
1040
|
+
type ttl = :"30m" | :"12h"
|
|
1041
1041
|
|
|
1042
1042
|
module Ttl
|
|
1043
1043
|
extend OpenAI::Internal::Type::Enum
|
|
1044
1044
|
|
|
1045
1045
|
TTL_30M: :"30m"
|
|
1046
|
+
TTL_12H: :"12h"
|
|
1046
1047
|
|
|
1047
1048
|
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::ttl]
|
|
1048
1049
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Resources
|
|
3
|
+
class Admin
|
|
4
|
+
class Organization
|
|
5
|
+
class Projects
|
|
6
|
+
class ServiceTierSettings
|
|
7
|
+
def retrieve: (
|
|
8
|
+
String project_id,
|
|
9
|
+
?request_options: OpenAI::request_opts
|
|
10
|
+
) -> OpenAI::Admin::Organization::Projects::ProjectServiceTierSettings
|
|
11
|
+
|
|
12
|
+
def update: (
|
|
13
|
+
String project_id,
|
|
14
|
+
?default: OpenAI::Models::Admin::Organization::Projects::ServiceTierSettingUpdateParams::default,
|
|
15
|
+
?enabled_tiers: OpenAI::Models::Admin::Organization::Projects::ServiceTierSettingUpdateParams::enabled_tiers,
|
|
16
|
+
?request_options: OpenAI::request_opts
|
|
17
|
+
) -> OpenAI::Admin::Organization::Projects::ProjectServiceTierSettings
|
|
18
|
+
|
|
19
|
+
def initialize: (client: OpenAI::Client) -> void
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -27,6 +27,8 @@ module OpenAI
|
|
|
27
27
|
|
|
28
28
|
attr_reader certificates: OpenAI::Resources::Admin::Organization::Projects::Certificates
|
|
29
29
|
|
|
30
|
+
attr_reader service_tier_settings: OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings
|
|
31
|
+
|
|
30
32
|
def create: (
|
|
31
33
|
name: String,
|
|
32
34
|
?external_key_id: String?,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.118.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAI
|
|
@@ -350,8 +350,10 @@ files:
|
|
|
350
350
|
- lib/openai/models/admin/organization/projects/project_hosted_tool_permissions.rb
|
|
351
351
|
- lib/openai/models/admin/organization/projects/project_model_permissions.rb
|
|
352
352
|
- lib/openai/models/admin/organization/projects/project_model_permissions_deleted.rb
|
|
353
|
+
- lib/openai/models/admin/organization/projects/project_optional_service_tier.rb
|
|
353
354
|
- lib/openai/models/admin/organization/projects/project_rate_limit.rb
|
|
354
355
|
- lib/openai/models/admin/organization/projects/project_service_account.rb
|
|
356
|
+
- lib/openai/models/admin/organization/projects/project_service_tier_settings.rb
|
|
355
357
|
- lib/openai/models/admin/organization/projects/project_spend_alert.rb
|
|
356
358
|
- lib/openai/models/admin/organization/projects/project_spend_alert_deleted.rb
|
|
357
359
|
- lib/openai/models/admin/organization/projects/project_spend_limit.rb
|
|
@@ -374,6 +376,8 @@ files:
|
|
|
374
376
|
- lib/openai/models/admin/organization/projects/service_account_update_params.rb
|
|
375
377
|
- lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb
|
|
376
378
|
- lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb
|
|
379
|
+
- lib/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rb
|
|
380
|
+
- lib/openai/models/admin/organization/projects/service_tier_setting_update_params.rb
|
|
377
381
|
- lib/openai/models/admin/organization/projects/spend_alert_create_params.rb
|
|
378
382
|
- lib/openai/models/admin/organization/projects/spend_alert_delete_params.rb
|
|
379
383
|
- lib/openai/models/admin/organization/projects/spend_alert_list_params.rb
|
|
@@ -1732,6 +1736,7 @@ files:
|
|
|
1732
1736
|
- lib/openai/resources/admin/organization/projects/roles.rb
|
|
1733
1737
|
- lib/openai/resources/admin/organization/projects/service_accounts.rb
|
|
1734
1738
|
- lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb
|
|
1739
|
+
- lib/openai/resources/admin/organization/projects/service_tier_settings.rb
|
|
1735
1740
|
- lib/openai/resources/admin/organization/projects/spend_alerts.rb
|
|
1736
1741
|
- lib/openai/resources/admin/organization/projects/spend_limit.rb
|
|
1737
1742
|
- lib/openai/resources/admin/organization/projects/users.rb
|
|
@@ -2058,8 +2063,10 @@ files:
|
|
|
2058
2063
|
- rbi/openai/models/admin/organization/projects/project_hosted_tool_permissions.rbi
|
|
2059
2064
|
- rbi/openai/models/admin/organization/projects/project_model_permissions.rbi
|
|
2060
2065
|
- rbi/openai/models/admin/organization/projects/project_model_permissions_deleted.rbi
|
|
2066
|
+
- rbi/openai/models/admin/organization/projects/project_optional_service_tier.rbi
|
|
2061
2067
|
- rbi/openai/models/admin/organization/projects/project_rate_limit.rbi
|
|
2062
2068
|
- rbi/openai/models/admin/organization/projects/project_service_account.rbi
|
|
2069
|
+
- rbi/openai/models/admin/organization/projects/project_service_tier_settings.rbi
|
|
2063
2070
|
- rbi/openai/models/admin/organization/projects/project_spend_alert.rbi
|
|
2064
2071
|
- rbi/openai/models/admin/organization/projects/project_spend_alert_deleted.rbi
|
|
2065
2072
|
- rbi/openai/models/admin/organization/projects/project_spend_limit.rbi
|
|
@@ -2082,6 +2089,8 @@ files:
|
|
|
2082
2089
|
- rbi/openai/models/admin/organization/projects/service_account_update_params.rbi
|
|
2083
2090
|
- rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbi
|
|
2084
2091
|
- rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbi
|
|
2092
|
+
- rbi/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbi
|
|
2093
|
+
- rbi/openai/models/admin/organization/projects/service_tier_setting_update_params.rbi
|
|
2085
2094
|
- rbi/openai/models/admin/organization/projects/spend_alert_create_params.rbi
|
|
2086
2095
|
- rbi/openai/models/admin/organization/projects/spend_alert_delete_params.rbi
|
|
2087
2096
|
- rbi/openai/models/admin/organization/projects/spend_alert_list_params.rbi
|
|
@@ -3437,6 +3446,7 @@ files:
|
|
|
3437
3446
|
- rbi/openai/resources/admin/organization/projects/roles.rbi
|
|
3438
3447
|
- rbi/openai/resources/admin/organization/projects/service_accounts.rbi
|
|
3439
3448
|
- rbi/openai/resources/admin/organization/projects/service_accounts/api_keys.rbi
|
|
3449
|
+
- rbi/openai/resources/admin/organization/projects/service_tier_settings.rbi
|
|
3440
3450
|
- rbi/openai/resources/admin/organization/projects/spend_alerts.rbi
|
|
3441
3451
|
- rbi/openai/resources/admin/organization/projects/spend_limit.rbi
|
|
3442
3452
|
- rbi/openai/resources/admin/organization/projects/users.rbi
|
|
@@ -3753,8 +3763,10 @@ files:
|
|
|
3753
3763
|
- sig/openai/models/admin/organization/projects/project_hosted_tool_permissions.rbs
|
|
3754
3764
|
- sig/openai/models/admin/organization/projects/project_model_permissions.rbs
|
|
3755
3765
|
- sig/openai/models/admin/organization/projects/project_model_permissions_deleted.rbs
|
|
3766
|
+
- sig/openai/models/admin/organization/projects/project_optional_service_tier.rbs
|
|
3756
3767
|
- sig/openai/models/admin/organization/projects/project_rate_limit.rbs
|
|
3757
3768
|
- sig/openai/models/admin/organization/projects/project_service_account.rbs
|
|
3769
|
+
- sig/openai/models/admin/organization/projects/project_service_tier_settings.rbs
|
|
3758
3770
|
- sig/openai/models/admin/organization/projects/project_spend_alert.rbs
|
|
3759
3771
|
- sig/openai/models/admin/organization/projects/project_spend_alert_deleted.rbs
|
|
3760
3772
|
- sig/openai/models/admin/organization/projects/project_spend_limit.rbs
|
|
@@ -3777,6 +3789,8 @@ files:
|
|
|
3777
3789
|
- sig/openai/models/admin/organization/projects/service_account_update_params.rbs
|
|
3778
3790
|
- sig/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbs
|
|
3779
3791
|
- sig/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbs
|
|
3792
|
+
- sig/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbs
|
|
3793
|
+
- sig/openai/models/admin/organization/projects/service_tier_setting_update_params.rbs
|
|
3780
3794
|
- sig/openai/models/admin/organization/projects/spend_alert_create_params.rbs
|
|
3781
3795
|
- sig/openai/models/admin/organization/projects/spend_alert_delete_params.rbs
|
|
3782
3796
|
- sig/openai/models/admin/organization/projects/spend_alert_list_params.rbs
|
|
@@ -5132,6 +5146,7 @@ files:
|
|
|
5132
5146
|
- sig/openai/resources/admin/organization/projects/roles.rbs
|
|
5133
5147
|
- sig/openai/resources/admin/organization/projects/service_accounts.rbs
|
|
5134
5148
|
- sig/openai/resources/admin/organization/projects/service_accounts/api_keys.rbs
|
|
5149
|
+
- sig/openai/resources/admin/organization/projects/service_tier_settings.rbs
|
|
5135
5150
|
- sig/openai/resources/admin/organization/projects/spend_alerts.rbs
|
|
5136
5151
|
- sig/openai/resources/admin/organization/projects/spend_limit.rbs
|
|
5137
5152
|
- sig/openai/resources/admin/organization/projects/users.rbs
|