openai 1.6.0 → 1.7.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 +7 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_completions_params.rb +23 -8
- data/lib/openai/models/admin/organization/usage_completions_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_costs_params.rb +25 -12
- data/lib/openai/models/admin/organization/usage_costs_response.rb +47 -19
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_images_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +8 -1
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +8 -1
- data/lib/openai/resources/admin/organization/usage.rb +24 -11
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_completions_params.rbi +26 -8
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +28 -12
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +91 -67
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +8 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +24 -11
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +35 -12
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +43 -19
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +38 -21
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_images_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +5 -0
- data/sig/openai/resources/admin/organization/usage.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad2ad9abdbb338cdef060fac28f38f9172e61a6255c334da6aa2463413a9a4e8
|
|
4
|
+
data.tar.gz: 23a45beb1e56e56f2a6322b1cba1be5785ff3a2bfe696104a822f62f1398572d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: baf4efb26b9928b99af69ffbdd71c057103ef1a06778765c10414a9a2cc1a561d1294d5e5a5620d89cd2f0dacb00180245002d9785808a5c31a7bba02fb92d52
|
|
7
|
+
data.tar.gz: c7a60f79c1a3b3da15934d1dd1aad9874426204a2294f36c013d7e8076a8de0d0c923fff873177b848ae4730b116152165064f22ed6ac51b34013b6bf131c950
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.7.0](https://github.com/openai/openai-ruby/compare/v1.6.0...v1.7.0) (2026-12-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** group Completions usage and costs by completion window ([#1140](https://github.com/openai/openai-ruby/issues/1140)) ([2dcad5f](https://github.com/openai/openai-ruby/commit/2dcad5f1f56746d11266c9fa4e652ee55eb59b9f))
|
|
9
|
+
|
|
3
10
|
## [1.6.0](https://github.com/openai/openai-ruby/compare/v1.5.0...v1.6.0) (2026-12-05)
|
|
4
11
|
|
|
5
12
|
|
data/README.md
CHANGED
|
@@ -222,6 +222,11 @@ module OpenAI
|
|
|
222
222
|
# @return [Boolean, nil]
|
|
223
223
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
224
224
|
|
|
225
|
+
# @!attribute completion_window
|
|
226
|
+
#
|
|
227
|
+
# @return [String, nil]
|
|
228
|
+
optional :completion_window, String, nil?: true
|
|
229
|
+
|
|
225
230
|
# @!attribute input_audio_tokens
|
|
226
231
|
# The aggregated number of uncached audio input tokens used.
|
|
227
232
|
#
|
|
@@ -340,7 +345,7 @@ module OpenAI
|
|
|
340
345
|
# @return [String, nil]
|
|
341
346
|
optional :user_id, String, nil?: true
|
|
342
347
|
|
|
343
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
348
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
344
349
|
# The aggregated completions usage details of the specific time bucket.
|
|
345
350
|
#
|
|
346
351
|
# @param input_tokens [Integer]
|
|
@@ -370,6 +375,8 @@ module OpenAI
|
|
|
370
375
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
371
376
|
# batch or not.
|
|
372
377
|
#
|
|
378
|
+
# @param completion_window [String, nil]
|
|
379
|
+
#
|
|
373
380
|
# @param input_audio_tokens [Integer]
|
|
374
381
|
# The aggregated number of uncached audio input tokens used.
|
|
375
382
|
#
|
|
@@ -224,6 +224,11 @@ module OpenAI
|
|
|
224
224
|
# @return [Boolean, nil]
|
|
225
225
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
226
226
|
|
|
227
|
+
# @!attribute completion_window
|
|
228
|
+
#
|
|
229
|
+
# @return [String, nil]
|
|
230
|
+
optional :completion_window, String, nil?: true
|
|
231
|
+
|
|
227
232
|
# @!attribute input_audio_tokens
|
|
228
233
|
# The aggregated number of uncached audio input tokens used.
|
|
229
234
|
#
|
|
@@ -342,7 +347,7 @@ module OpenAI
|
|
|
342
347
|
# @return [String, nil]
|
|
343
348
|
optional :user_id, String, nil?: true
|
|
344
349
|
|
|
345
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
350
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
346
351
|
# The aggregated completions usage details of the specific time bucket.
|
|
347
352
|
#
|
|
348
353
|
# @param input_tokens [Integer]
|
|
@@ -372,6 +377,8 @@ module OpenAI
|
|
|
372
377
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
373
378
|
# batch or not.
|
|
374
379
|
#
|
|
380
|
+
# @param completion_window [String, nil]
|
|
381
|
+
#
|
|
375
382
|
# @param input_audio_tokens [Integer]
|
|
376
383
|
# The aggregated number of uncached audio input tokens used.
|
|
377
384
|
#
|
|
@@ -224,6 +224,11 @@ module OpenAI
|
|
|
224
224
|
# @return [Boolean, nil]
|
|
225
225
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
226
226
|
|
|
227
|
+
# @!attribute completion_window
|
|
228
|
+
#
|
|
229
|
+
# @return [String, nil]
|
|
230
|
+
optional :completion_window, String, nil?: true
|
|
231
|
+
|
|
227
232
|
# @!attribute input_audio_tokens
|
|
228
233
|
# The aggregated number of uncached audio input tokens used.
|
|
229
234
|
#
|
|
@@ -342,7 +347,7 @@ module OpenAI
|
|
|
342
347
|
# @return [String, nil]
|
|
343
348
|
optional :user_id, String, nil?: true
|
|
344
349
|
|
|
345
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
350
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
346
351
|
# The aggregated completions usage details of the specific time bucket.
|
|
347
352
|
#
|
|
348
353
|
# @param input_tokens [Integer]
|
|
@@ -372,6 +377,8 @@ module OpenAI
|
|
|
372
377
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
373
378
|
# batch or not.
|
|
374
379
|
#
|
|
380
|
+
# @param completion_window [String, nil]
|
|
381
|
+
#
|
|
375
382
|
# @param input_audio_tokens [Integer]
|
|
376
383
|
# The aggregated number of uncached audio input tokens used.
|
|
377
384
|
#
|
|
@@ -42,11 +42,18 @@ module OpenAI
|
|
|
42
42
|
optional :end_time, Integer
|
|
43
43
|
|
|
44
44
|
# @!attribute group_by
|
|
45
|
-
# Group the usage data by the specified fields.
|
|
45
|
+
# Group the usage data by the specified fields. Supported fields include
|
|
46
46
|
# `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier`,
|
|
47
|
-
# `api_source` or any combination of them. When grouped by
|
|
48
|
-
# use `agents_api` for attributed Agents API activity and
|
|
49
|
-
# other activity. Without source grouping, `api_source` is
|
|
47
|
+
# `api_source`, `completion_window` or any combination of them. When grouped by
|
|
48
|
+
# `api_source`, results use `agents_api` for attributed Agents API activity and
|
|
49
|
+
# `unlabeled` for all other activity. Without source grouping, `api_source` is
|
|
50
|
+
# null. When grouped by `completion_window`, results use `2h`, `8h`, or
|
|
51
|
+
# `unlabeled` when no known or applicable window is available. Without window
|
|
52
|
+
# grouping, `completion_window` is null. Unlabeled does not imply Standard
|
|
53
|
+
# traffic. The field may be omitted when completion-window reporting is
|
|
54
|
+
# unavailable. Completion window is separate from `service_tier`; Batch's 24h
|
|
55
|
+
# window and legacy Flex scheduling are not included. Keep the same grouping and
|
|
56
|
+
# filters when following `next_page`.
|
|
50
57
|
#
|
|
51
58
|
# @return [Array<Symbol, OpenAI::Models::Admin::Organization::UsageCompletionsParams::GroupBy>, nil]
|
|
52
59
|
optional(
|
|
@@ -108,11 +115,18 @@ module OpenAI
|
|
|
108
115
|
# End time (Unix seconds) of the query time range, exclusive.
|
|
109
116
|
#
|
|
110
117
|
# @param group_by [Array<Symbol, OpenAI::Models::Admin::Organization::UsageCompletionsParams::GroupBy>]
|
|
111
|
-
# Group the usage data by the specified fields.
|
|
118
|
+
# Group the usage data by the specified fields. Supported fields include
|
|
112
119
|
# `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier`,
|
|
113
|
-
# `api_source` or any combination of them. When grouped by
|
|
114
|
-
# use `agents_api` for attributed Agents API activity and
|
|
115
|
-
# other activity. Without source grouping, `api_source` is
|
|
120
|
+
# `api_source`, `completion_window` or any combination of them. When grouped by
|
|
121
|
+
# `api_source`, results use `agents_api` for attributed Agents API activity and
|
|
122
|
+
# `unlabeled` for all other activity. Without source grouping, `api_source` is
|
|
123
|
+
# null. When grouped by `completion_window`, results use `2h`, `8h`, or
|
|
124
|
+
# `unlabeled` when no known or applicable window is available. Without window
|
|
125
|
+
# grouping, `completion_window` is null. Unlabeled does not imply Standard
|
|
126
|
+
# traffic. The field may be omitted when completion-window reporting is
|
|
127
|
+
# unavailable. Completion window is separate from `service_tier`; Batch's 24h
|
|
128
|
+
# window and legacy Flex scheduling are not included. Keep the same grouping and
|
|
129
|
+
# filters when following `next_page`.
|
|
116
130
|
#
|
|
117
131
|
# @param limit [Integer]
|
|
118
132
|
# Specifies the number of buckets to return.
|
|
@@ -159,6 +173,7 @@ module OpenAI
|
|
|
159
173
|
BATCH = :batch
|
|
160
174
|
SERVICE_TIER = :service_tier
|
|
161
175
|
API_SOURCE = :api_source
|
|
176
|
+
COMPLETION_WINDOW = :completion_window
|
|
162
177
|
|
|
163
178
|
# @!method self.values
|
|
164
179
|
# @return [Array<Symbol>]
|
|
@@ -220,6 +220,11 @@ module OpenAI
|
|
|
220
220
|
# @return [Boolean, nil]
|
|
221
221
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
222
222
|
|
|
223
|
+
# @!attribute completion_window
|
|
224
|
+
#
|
|
225
|
+
# @return [String, nil]
|
|
226
|
+
optional :completion_window, String, nil?: true
|
|
227
|
+
|
|
223
228
|
# @!attribute input_audio_tokens
|
|
224
229
|
# The aggregated number of uncached audio input tokens used.
|
|
225
230
|
#
|
|
@@ -338,7 +343,7 @@ module OpenAI
|
|
|
338
343
|
# @return [String, nil]
|
|
339
344
|
optional :user_id, String, nil?: true
|
|
340
345
|
|
|
341
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
346
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
342
347
|
# The aggregated completions usage details of the specific time bucket.
|
|
343
348
|
#
|
|
344
349
|
# @param input_tokens [Integer]
|
|
@@ -368,6 +373,8 @@ module OpenAI
|
|
|
368
373
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
369
374
|
# batch or not.
|
|
370
375
|
#
|
|
376
|
+
# @param completion_window [String, nil]
|
|
377
|
+
#
|
|
371
378
|
# @param input_audio_tokens [Integer]
|
|
372
379
|
# The aggregated number of uncached audio input tokens used.
|
|
373
380
|
#
|
|
@@ -36,12 +36,18 @@ module OpenAI
|
|
|
36
36
|
|
|
37
37
|
# @!attribute group_by
|
|
38
38
|
# Group the costs by the specified fields. Supported fields include `project_id`,
|
|
39
|
-
# `user_id`, `line_item`, `api_key_id`, and `
|
|
40
|
-
# `user_id` with `project_id` grouping or the `project_ids`
|
|
41
|
-
# organization and requested time range. Unsupported
|
|
42
|
-
# When grouped by `api_source`, results use
|
|
43
|
-
# activity and `unlabeled` for all other
|
|
44
|
-
# `api_source` is null.
|
|
39
|
+
# `user_id`, `line_item`, `api_key_id`, `api_source`, and `completion_window`.
|
|
40
|
+
# Support for combining `user_id` with `project_id` grouping or the `project_ids`
|
|
41
|
+
# filter depends on the organization and requested time range. Unsupported
|
|
42
|
+
# combinations return HTTP 400. When grouped by `api_source`, results use
|
|
43
|
+
# `agents_api` for attributed Agents API activity and `unlabeled` for all other
|
|
44
|
+
# activity. Without source grouping, `api_source` is null. When grouped by
|
|
45
|
+
# `completion_window`, results use `2h`, `8h`, or `unlabeled` when no known or
|
|
46
|
+
# applicable window is available. Without window grouping, `completion_window` is
|
|
47
|
+
# null. Unlabeled does not imply Standard traffic. The field may be omitted when
|
|
48
|
+
# completion-window reporting is unavailable. Batch's 24h window and legacy Flex
|
|
49
|
+
# scheduling are not included. Existing line item names and exact-name filters are
|
|
50
|
+
# unchanged. Keep the same grouping and filters when following `next_page`.
|
|
45
51
|
#
|
|
46
52
|
# @return [Array<Symbol, OpenAI::Models::Admin::Organization::UsageCostsParams::GroupBy>, nil]
|
|
47
53
|
optional(
|
|
@@ -92,12 +98,18 @@ module OpenAI
|
|
|
92
98
|
#
|
|
93
99
|
# @param group_by [Array<Symbol, OpenAI::Models::Admin::Organization::UsageCostsParams::GroupBy>]
|
|
94
100
|
# Group the costs by the specified fields. Supported fields include `project_id`,
|
|
95
|
-
# `user_id`, `line_item`, `api_key_id`, and `
|
|
96
|
-
# `user_id` with `project_id` grouping or the `project_ids`
|
|
97
|
-
# organization and requested time range. Unsupported
|
|
98
|
-
# When grouped by `api_source`, results use
|
|
99
|
-
# activity and `unlabeled` for all other
|
|
100
|
-
# `api_source` is null.
|
|
101
|
+
# `user_id`, `line_item`, `api_key_id`, `api_source`, and `completion_window`.
|
|
102
|
+
# Support for combining `user_id` with `project_id` grouping or the `project_ids`
|
|
103
|
+
# filter depends on the organization and requested time range. Unsupported
|
|
104
|
+
# combinations return HTTP 400. When grouped by `api_source`, results use
|
|
105
|
+
# `agents_api` for attributed Agents API activity and `unlabeled` for all other
|
|
106
|
+
# activity. Without source grouping, `api_source` is null. When grouped by
|
|
107
|
+
# `completion_window`, results use `2h`, `8h`, or `unlabeled` when no known or
|
|
108
|
+
# applicable window is available. Without window grouping, `completion_window` is
|
|
109
|
+
# null. Unlabeled does not imply Standard traffic. The field may be omitted when
|
|
110
|
+
# completion-window reporting is unavailable. Batch's 24h window and legacy Flex
|
|
111
|
+
# scheduling are not included. Existing line item names and exact-name filters are
|
|
112
|
+
# unchanged. Keep the same grouping and filters when following `next_page`.
|
|
101
113
|
#
|
|
102
114
|
# @param limit [Integer]
|
|
103
115
|
# A limit on the number of buckets to be returned. Limit can range between 1 and
|
|
@@ -135,6 +147,7 @@ module OpenAI
|
|
|
135
147
|
LINE_ITEM = :line_item
|
|
136
148
|
API_KEY_ID = :api_key_id
|
|
137
149
|
API_SOURCE = :api_source
|
|
150
|
+
COMPLETION_WINDOW = :completion_window
|
|
138
151
|
|
|
139
152
|
# @!method self.values
|
|
140
153
|
# @return [Array<Symbol>]
|
|
@@ -11,7 +11,7 @@ module OpenAI
|
|
|
11
11
|
# @return [Array<OpenAI::Models::Admin::Organization::UsageCostsResponse::Data>]
|
|
12
12
|
required(
|
|
13
13
|
:data,
|
|
14
|
-
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Admin::Organization::UsageCostsResponse::Data] }
|
|
14
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Models::Admin::Organization::UsageCostsResponse::Data] }
|
|
15
15
|
)
|
|
16
16
|
|
|
17
17
|
# @!attribute has_more
|
|
@@ -52,7 +52,9 @@ module OpenAI
|
|
|
52
52
|
required(
|
|
53
53
|
:results,
|
|
54
54
|
-> {
|
|
55
|
-
OpenAI::Internal::Type::ArrayOf[
|
|
55
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
56
|
+
union: OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result
|
|
57
|
+
]
|
|
56
58
|
}
|
|
57
59
|
)
|
|
58
60
|
|
|
@@ -77,35 +79,39 @@ module OpenAI
|
|
|
77
79
|
variant(
|
|
78
80
|
:"organization.usage.completions.result",
|
|
79
81
|
-> {
|
|
80
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult
|
|
82
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult
|
|
81
83
|
}
|
|
82
84
|
)
|
|
83
85
|
|
|
84
86
|
# The aggregated embeddings usage details of the specific time bucket.
|
|
85
87
|
variant(
|
|
86
88
|
:"organization.usage.embeddings.result",
|
|
87
|
-
-> {
|
|
89
|
+
-> {
|
|
90
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageEmbeddingsResult
|
|
91
|
+
}
|
|
88
92
|
)
|
|
89
93
|
|
|
90
94
|
# The aggregated moderations usage details of the specific time bucket.
|
|
91
95
|
variant(
|
|
92
96
|
:"organization.usage.moderations.result",
|
|
93
97
|
-> {
|
|
94
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageModerationsResult
|
|
98
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageModerationsResult
|
|
95
99
|
}
|
|
96
100
|
)
|
|
97
101
|
|
|
98
102
|
# The aggregated images usage details of the specific time bucket.
|
|
99
103
|
variant(
|
|
100
104
|
:"organization.usage.images.result",
|
|
101
|
-
-> {
|
|
105
|
+
-> {
|
|
106
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageImagesResult
|
|
107
|
+
}
|
|
102
108
|
)
|
|
103
109
|
|
|
104
110
|
# The aggregated audio speeches usage details of the specific time bucket.
|
|
105
111
|
variant(
|
|
106
112
|
:"organization.usage.audio_speeches.result",
|
|
107
113
|
-> {
|
|
108
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageAudioSpeechesResult
|
|
114
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageAudioSpeechesResult
|
|
109
115
|
}
|
|
110
116
|
)
|
|
111
117
|
|
|
@@ -113,7 +119,7 @@ module OpenAI
|
|
|
113
119
|
variant(
|
|
114
120
|
:"organization.usage.audio_transcriptions.result",
|
|
115
121
|
-> {
|
|
116
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult
|
|
122
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageAudioTranscriptionsResult
|
|
117
123
|
}
|
|
118
124
|
)
|
|
119
125
|
|
|
@@ -121,7 +127,7 @@ module OpenAI
|
|
|
121
127
|
variant(
|
|
122
128
|
:"organization.usage.vector_stores.result",
|
|
123
129
|
-> {
|
|
124
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageVectorStoresResult
|
|
130
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageVectorStoresResult
|
|
125
131
|
}
|
|
126
132
|
)
|
|
127
133
|
|
|
@@ -129,7 +135,7 @@ module OpenAI
|
|
|
129
135
|
variant(
|
|
130
136
|
:"organization.usage.code_interpreter_sessions.result",
|
|
131
137
|
-> {
|
|
132
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult
|
|
138
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCodeInterpreterSessionsResult
|
|
133
139
|
}
|
|
134
140
|
)
|
|
135
141
|
|
|
@@ -137,7 +143,7 @@ module OpenAI
|
|
|
137
143
|
variant(
|
|
138
144
|
:"organization.usage.file_searches.result",
|
|
139
145
|
-> {
|
|
140
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageFileSearchesResult
|
|
146
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageFileSearchesResult
|
|
141
147
|
}
|
|
142
148
|
)
|
|
143
149
|
|
|
@@ -145,14 +151,14 @@ module OpenAI
|
|
|
145
151
|
variant(
|
|
146
152
|
:"organization.usage.web_searches.result",
|
|
147
153
|
-> {
|
|
148
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult
|
|
154
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult
|
|
149
155
|
}
|
|
150
156
|
)
|
|
151
157
|
|
|
152
158
|
# The aggregated costs details of the specific time bucket.
|
|
153
159
|
variant(
|
|
154
160
|
:"organization.costs.result",
|
|
155
|
-
-> { OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult }
|
|
161
|
+
-> { OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult }
|
|
156
162
|
)
|
|
157
163
|
|
|
158
164
|
class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -200,7 +206,7 @@ module OpenAI
|
|
|
200
206
|
optional(
|
|
201
207
|
:api_source,
|
|
202
208
|
enum: -> {
|
|
203
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
|
|
209
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
|
|
204
210
|
},
|
|
205
211
|
nil?: true
|
|
206
212
|
)
|
|
@@ -212,6 +218,11 @@ module OpenAI
|
|
|
212
218
|
# @return [Boolean, nil]
|
|
213
219
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
214
220
|
|
|
221
|
+
# @!attribute completion_window
|
|
222
|
+
#
|
|
223
|
+
# @return [String, nil]
|
|
224
|
+
optional :completion_window, String, nil?: true
|
|
225
|
+
|
|
215
226
|
# @!attribute input_audio_tokens
|
|
216
227
|
# The aggregated number of uncached audio input tokens used.
|
|
217
228
|
#
|
|
@@ -330,7 +341,7 @@ module OpenAI
|
|
|
330
341
|
# @return [String, nil]
|
|
331
342
|
optional :user_id, String, nil?: true
|
|
332
343
|
|
|
333
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
344
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
334
345
|
# The aggregated completions usage details of the specific time bucket.
|
|
335
346
|
#
|
|
336
347
|
# @param input_tokens [Integer]
|
|
@@ -360,6 +371,8 @@ module OpenAI
|
|
|
360
371
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
361
372
|
# batch or not.
|
|
362
373
|
#
|
|
374
|
+
# @param completion_window [String, nil]
|
|
375
|
+
#
|
|
363
376
|
# @param input_audio_tokens [Integer]
|
|
364
377
|
# The aggregated number of uncached audio input tokens used.
|
|
365
378
|
#
|
|
@@ -1000,7 +1013,7 @@ module OpenAI
|
|
|
1000
1013
|
optional(
|
|
1001
1014
|
:api_source,
|
|
1002
1015
|
enum: -> {
|
|
1003
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
|
|
1016
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
|
|
1004
1017
|
},
|
|
1005
1018
|
nil?: true
|
|
1006
1019
|
)
|
|
@@ -1099,7 +1112,9 @@ module OpenAI
|
|
|
1099
1112
|
# @return [OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::Amount, nil]
|
|
1100
1113
|
optional(
|
|
1101
1114
|
:amount,
|
|
1102
|
-
-> {
|
|
1115
|
+
-> {
|
|
1116
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::Amount
|
|
1117
|
+
}
|
|
1103
1118
|
)
|
|
1104
1119
|
|
|
1105
1120
|
# @!attribute api_key_id
|
|
@@ -1119,11 +1134,19 @@ module OpenAI
|
|
|
1119
1134
|
optional(
|
|
1120
1135
|
:api_source,
|
|
1121
1136
|
enum: -> {
|
|
1122
|
-
OpenAI::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::APISource
|
|
1137
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::APISource
|
|
1123
1138
|
},
|
|
1124
1139
|
nil?: true
|
|
1125
1140
|
)
|
|
1126
1141
|
|
|
1142
|
+
# @!attribute completion_window
|
|
1143
|
+
# The background completion window for this result. When group_by includes
|
|
1144
|
+
# completion_window, the value is 2h, 8h, or unlabeled if the window is unknown or
|
|
1145
|
+
# does not apply. Otherwise, the value is null.
|
|
1146
|
+
#
|
|
1147
|
+
# @return [String, nil]
|
|
1148
|
+
optional :completion_window, String, nil?: true
|
|
1149
|
+
|
|
1127
1150
|
# @!attribute line_item
|
|
1128
1151
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1129
1152
|
# costs result.
|
|
@@ -1185,7 +1208,7 @@ module OpenAI
|
|
|
1185
1208
|
# @return [String, nil]
|
|
1186
1209
|
optional :user_id, String, nil?: true
|
|
1187
1210
|
|
|
1188
|
-
# @!method initialize(amount: nil, api_key_id: nil, api_source: nil, line_item: nil, model: nil, project_id: nil, quantity: nil, quantity_unit: nil, token_type: nil, user_id: nil, object: :"organization.costs.result")
|
|
1211
|
+
# @!method initialize(amount: nil, api_key_id: nil, api_source: nil, completion_window: nil, line_item: nil, model: nil, project_id: nil, quantity: nil, quantity_unit: nil, token_type: nil, user_id: nil, object: :"organization.costs.result")
|
|
1189
1212
|
# The aggregated costs details of the specific time bucket.
|
|
1190
1213
|
#
|
|
1191
1214
|
# @param amount [OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::Amount]
|
|
@@ -1201,6 +1224,11 @@ module OpenAI
|
|
|
1201
1224
|
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1202
1225
|
# direct API usage. Without source grouping, this field is null.
|
|
1203
1226
|
#
|
|
1227
|
+
# @param completion_window [String, nil]
|
|
1228
|
+
# The background completion window for this result. When group_by includes
|
|
1229
|
+
# completion_window, the value is 2h, 8h, or unlabeled if the window is unknown or
|
|
1230
|
+
# does not apply. Otherwise, the value is null.
|
|
1231
|
+
#
|
|
1204
1232
|
# @param line_item [String, nil]
|
|
1205
1233
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1206
1234
|
# costs result.
|
|
@@ -220,6 +220,11 @@ module OpenAI
|
|
|
220
220
|
# @return [Boolean, nil]
|
|
221
221
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
222
222
|
|
|
223
|
+
# @!attribute completion_window
|
|
224
|
+
#
|
|
225
|
+
# @return [String, nil]
|
|
226
|
+
optional :completion_window, String, nil?: true
|
|
227
|
+
|
|
223
228
|
# @!attribute input_audio_tokens
|
|
224
229
|
# The aggregated number of uncached audio input tokens used.
|
|
225
230
|
#
|
|
@@ -338,7 +343,7 @@ module OpenAI
|
|
|
338
343
|
# @return [String, nil]
|
|
339
344
|
optional :user_id, String, nil?: true
|
|
340
345
|
|
|
341
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
346
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
342
347
|
# The aggregated completions usage details of the specific time bucket.
|
|
343
348
|
#
|
|
344
349
|
# @param input_tokens [Integer]
|
|
@@ -368,6 +373,8 @@ module OpenAI
|
|
|
368
373
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
369
374
|
# batch or not.
|
|
370
375
|
#
|
|
376
|
+
# @param completion_window [String, nil]
|
|
377
|
+
#
|
|
371
378
|
# @param input_audio_tokens [Integer]
|
|
372
379
|
# The aggregated number of uncached audio input tokens used.
|
|
373
380
|
#
|
|
@@ -222,6 +222,11 @@ module OpenAI
|
|
|
222
222
|
# @return [Boolean, nil]
|
|
223
223
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
224
224
|
|
|
225
|
+
# @!attribute completion_window
|
|
226
|
+
#
|
|
227
|
+
# @return [String, nil]
|
|
228
|
+
optional :completion_window, String, nil?: true
|
|
229
|
+
|
|
225
230
|
# @!attribute input_audio_tokens
|
|
226
231
|
# The aggregated number of uncached audio input tokens used.
|
|
227
232
|
#
|
|
@@ -340,7 +345,7 @@ module OpenAI
|
|
|
340
345
|
# @return [String, nil]
|
|
341
346
|
optional :user_id, String, nil?: true
|
|
342
347
|
|
|
343
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
348
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
344
349
|
# The aggregated completions usage details of the specific time bucket.
|
|
345
350
|
#
|
|
346
351
|
# @param input_tokens [Integer]
|
|
@@ -370,6 +375,8 @@ module OpenAI
|
|
|
370
375
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
371
376
|
# batch or not.
|
|
372
377
|
#
|
|
378
|
+
# @param completion_window [String, nil]
|
|
379
|
+
#
|
|
373
380
|
# @param input_audio_tokens [Integer]
|
|
374
381
|
# The aggregated number of uncached audio input tokens used.
|
|
375
382
|
#
|
|
@@ -218,6 +218,11 @@ module OpenAI
|
|
|
218
218
|
# @return [Boolean, nil]
|
|
219
219
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
220
220
|
|
|
221
|
+
# @!attribute completion_window
|
|
222
|
+
#
|
|
223
|
+
# @return [String, nil]
|
|
224
|
+
optional :completion_window, String, nil?: true
|
|
225
|
+
|
|
221
226
|
# @!attribute input_audio_tokens
|
|
222
227
|
# The aggregated number of uncached audio input tokens used.
|
|
223
228
|
#
|
|
@@ -336,7 +341,7 @@ module OpenAI
|
|
|
336
341
|
# @return [String, nil]
|
|
337
342
|
optional :user_id, String, nil?: true
|
|
338
343
|
|
|
339
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
344
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
340
345
|
# The aggregated completions usage details of the specific time bucket.
|
|
341
346
|
#
|
|
342
347
|
# @param input_tokens [Integer]
|
|
@@ -366,6 +371,8 @@ module OpenAI
|
|
|
366
371
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
367
372
|
# batch or not.
|
|
368
373
|
#
|
|
374
|
+
# @param completion_window [String, nil]
|
|
375
|
+
#
|
|
369
376
|
# @param input_audio_tokens [Integer]
|
|
370
377
|
# The aggregated number of uncached audio input tokens used.
|
|
371
378
|
#
|
|
@@ -220,6 +220,11 @@ module OpenAI
|
|
|
220
220
|
# @return [Boolean, nil]
|
|
221
221
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
222
222
|
|
|
223
|
+
# @!attribute completion_window
|
|
224
|
+
#
|
|
225
|
+
# @return [String, nil]
|
|
226
|
+
optional :completion_window, String, nil?: true
|
|
227
|
+
|
|
223
228
|
# @!attribute input_audio_tokens
|
|
224
229
|
# The aggregated number of uncached audio input tokens used.
|
|
225
230
|
#
|
|
@@ -338,7 +343,7 @@ module OpenAI
|
|
|
338
343
|
# @return [String, nil]
|
|
339
344
|
optional :user_id, String, nil?: true
|
|
340
345
|
|
|
341
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
346
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, api_source: nil, batch: nil, completion_window: nil, input_audio_tokens: nil, input_cache_write_12h_tokens: nil, input_cache_write_30m_tokens: nil, input_cache_write_tokens: nil, input_cached_audio_tokens: nil, input_cached_image_tokens: nil, input_cached_text_tokens: nil, input_cached_tokens: nil, input_image_tokens: nil, input_text_tokens: nil, input_uncached_tokens: nil, model: nil, output_audio_tokens: nil, output_image_tokens: nil, output_text_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
342
347
|
# The aggregated completions usage details of the specific time bucket.
|
|
343
348
|
#
|
|
344
349
|
# @param input_tokens [Integer]
|
|
@@ -368,6 +373,8 @@ module OpenAI
|
|
|
368
373
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
369
374
|
# batch or not.
|
|
370
375
|
#
|
|
376
|
+
# @param completion_window [String, nil]
|
|
377
|
+
#
|
|
371
378
|
# @param input_audio_tokens [Integer]
|
|
372
379
|
# The aggregated number of uncached audio input tokens used.
|
|
373
380
|
#
|