openai 0.70.0 → 0.71.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 +51 -1
- data/lib/openai/client.rb +62 -8
- data/lib/openai/internal/provider.rb +31 -0
- data/lib/openai/internal/transport/base_client.rb +65 -21
- data/lib/openai/models/admin/organization/audit_log_list_params.rb +84 -0
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +84 -0
- data/lib/openai/models/admin/organization/projects/project_service_account.rb +4 -3
- data/lib/openai/models/admin/organization/projects/service_account_create_params.rb +9 -1
- data/lib/openai/models/admin/organization/projects/service_account_create_response.rb +26 -6
- data/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb +54 -0
- data/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb +57 -0
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_completions_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_costs_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_images_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +88 -13
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +88 -13
- data/lib/openai/models/beta/beta_response_input_item.rb +16 -32
- data/lib/openai/provider.rb +18 -0
- data/lib/openai/providers/bedrock.rb +489 -0
- data/lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb +60 -0
- data/lib/openai/resources/admin/organization/projects/service_accounts.rb +10 -3
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +6 -0
- data/rbi/openai/client.rbi +17 -0
- data/rbi/openai/internal/provider.rbi +51 -0
- data/rbi/openai/internal/transport/base_client.rbi +32 -0
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +420 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +420 -0
- data/rbi/openai/models/admin/organization/projects/project_service_account.rbi +8 -3
- data/rbi/openai/models/admin/organization/projects/service_account_create_params.rbi +8 -0
- data/rbi/openai/models/admin/organization/projects/service_account_create_response.rbi +52 -8
- data/rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbi +84 -0
- data/rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbi +80 -0
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +121 -16
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +121 -16
- data/rbi/openai/models/beta/beta_response_input_item.rbi +39 -46
- data/rbi/openai/provider.rbi +9 -0
- data/rbi/openai/providers.rbi +33 -0
- data/rbi/openai/resources/admin/organization/projects/service_accounts/api_keys.rbi +45 -0
- data/rbi/openai/resources/admin/organization/projects/service_accounts.rbi +12 -2
- data/sig/openai/client.rbs +7 -0
- data/sig/openai/internal/provider.rbs +29 -0
- data/sig/openai/internal/transport/base_client.rbs +17 -1
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +168 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +168 -0
- data/sig/openai/models/admin/organization/projects/project_service_account.rbs +2 -1
- data/sig/openai/models/admin/organization/projects/service_account_create_params.rbs +9 -1
- data/sig/openai/models/admin/organization/projects/service_account_create_response.rbs +16 -5
- data/sig/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbs +53 -0
- data/sig/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbs +48 -0
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_images_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +63 -0
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +63 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +18 -24
- data/sig/openai/provider.rbs +5 -0
- data/sig/openai/providers.rbs +15 -0
- data/sig/openai/resources/admin/organization/projects/service_accounts/api_keys.rbs +23 -0
- data/sig/openai/resources/admin/organization/projects/service_accounts.rbs +3 -0
- metadata +20 -2
|
@@ -113,8 +113,9 @@ module OpenAI
|
|
|
113
113
|
|
|
114
114
|
class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel
|
|
115
115
|
# @!attribute input_tokens
|
|
116
|
-
# The aggregated number of
|
|
117
|
-
#
|
|
116
|
+
# The aggregated number of input tokens used, including cached and cache-write
|
|
117
|
+
# tokens. This includes text, audio, and image tokens. For customers subscribed to
|
|
118
|
+
# Scale Tier, this includes Scale Tier tokens.
|
|
118
119
|
#
|
|
119
120
|
# @return [Integer]
|
|
120
121
|
required :input_tokens, Integer
|
|
@@ -131,8 +132,9 @@ module OpenAI
|
|
|
131
132
|
required :object, const: :"organization.usage.completions.result"
|
|
132
133
|
|
|
133
134
|
# @!attribute output_tokens
|
|
134
|
-
# The aggregated number of
|
|
135
|
-
#
|
|
135
|
+
# The aggregated number of output tokens used across text, audio, and image
|
|
136
|
+
# outputs. For customers subscribed to Scale Tier, this includes Scale Tier
|
|
137
|
+
# tokens.
|
|
136
138
|
#
|
|
137
139
|
# @return [Integer]
|
|
138
140
|
required :output_tokens, Integer
|
|
@@ -152,19 +154,62 @@ module OpenAI
|
|
|
152
154
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
153
155
|
|
|
154
156
|
# @!attribute input_audio_tokens
|
|
155
|
-
# The aggregated number of audio input tokens used
|
|
157
|
+
# The aggregated number of uncached audio input tokens used.
|
|
156
158
|
#
|
|
157
159
|
# @return [Integer, nil]
|
|
158
160
|
optional :input_audio_tokens, Integer
|
|
159
161
|
|
|
162
|
+
# @!attribute input_cache_write_tokens
|
|
163
|
+
# The aggregated number of input tokens written to the cache.
|
|
164
|
+
#
|
|
165
|
+
# @return [Integer, nil]
|
|
166
|
+
optional :input_cache_write_tokens, Integer
|
|
167
|
+
|
|
168
|
+
# @!attribute input_cached_audio_tokens
|
|
169
|
+
# The aggregated number of cached audio input tokens used.
|
|
170
|
+
#
|
|
171
|
+
# @return [Integer, nil]
|
|
172
|
+
optional :input_cached_audio_tokens, Integer
|
|
173
|
+
|
|
174
|
+
# @!attribute input_cached_image_tokens
|
|
175
|
+
# The aggregated number of cached image input tokens used.
|
|
176
|
+
#
|
|
177
|
+
# @return [Integer, nil]
|
|
178
|
+
optional :input_cached_image_tokens, Integer
|
|
179
|
+
|
|
180
|
+
# @!attribute input_cached_text_tokens
|
|
181
|
+
# The aggregated number of cached text input tokens used.
|
|
182
|
+
#
|
|
183
|
+
# @return [Integer, nil]
|
|
184
|
+
optional :input_cached_text_tokens, Integer
|
|
185
|
+
|
|
160
186
|
# @!attribute input_cached_tokens
|
|
161
|
-
# The aggregated number of
|
|
162
|
-
#
|
|
163
|
-
# tokens.
|
|
187
|
+
# The aggregated number of cached input tokens used across text, audio, and image
|
|
188
|
+
# inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens.
|
|
164
189
|
#
|
|
165
190
|
# @return [Integer, nil]
|
|
166
191
|
optional :input_cached_tokens, Integer
|
|
167
192
|
|
|
193
|
+
# @!attribute input_image_tokens
|
|
194
|
+
# The aggregated number of uncached image input tokens used.
|
|
195
|
+
#
|
|
196
|
+
# @return [Integer, nil]
|
|
197
|
+
optional :input_image_tokens, Integer
|
|
198
|
+
|
|
199
|
+
# @!attribute input_text_tokens
|
|
200
|
+
# The aggregated number of uncached text input tokens used, excluding cache-write
|
|
201
|
+
# tokens.
|
|
202
|
+
#
|
|
203
|
+
# @return [Integer, nil]
|
|
204
|
+
optional :input_text_tokens, Integer
|
|
205
|
+
|
|
206
|
+
# @!attribute input_uncached_tokens
|
|
207
|
+
# The aggregated number of uncached input tokens used across text, audio, and
|
|
208
|
+
# image inputs, excluding cache-write tokens.
|
|
209
|
+
#
|
|
210
|
+
# @return [Integer, nil]
|
|
211
|
+
optional :input_uncached_tokens, Integer
|
|
212
|
+
|
|
168
213
|
# @!attribute model
|
|
169
214
|
# When `group_by=model`, this field provides the model name of the grouped usage
|
|
170
215
|
# result.
|
|
@@ -178,6 +223,18 @@ module OpenAI
|
|
|
178
223
|
# @return [Integer, nil]
|
|
179
224
|
optional :output_audio_tokens, Integer
|
|
180
225
|
|
|
226
|
+
# @!attribute output_image_tokens
|
|
227
|
+
# The aggregated number of image output tokens used.
|
|
228
|
+
#
|
|
229
|
+
# @return [Integer, nil]
|
|
230
|
+
optional :output_image_tokens, Integer
|
|
231
|
+
|
|
232
|
+
# @!attribute output_text_tokens
|
|
233
|
+
# The aggregated number of text output tokens used.
|
|
234
|
+
#
|
|
235
|
+
# @return [Integer, nil]
|
|
236
|
+
optional :output_text_tokens, Integer
|
|
237
|
+
|
|
181
238
|
# @!attribute project_id
|
|
182
239
|
# When `group_by=project_id`, this field provides the project ID of the grouped
|
|
183
240
|
# usage result.
|
|
@@ -199,31 +256,49 @@ module OpenAI
|
|
|
199
256
|
# @return [String, nil]
|
|
200
257
|
optional :user_id, String, nil?: true
|
|
201
258
|
|
|
202
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cached_tokens: nil, model: nil, output_audio_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
259
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_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")
|
|
203
260
|
# Some parameter documentations has been truncated, see
|
|
204
261
|
# {OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageCompletionsResult}
|
|
205
262
|
# for more details.
|
|
206
263
|
#
|
|
207
264
|
# The aggregated completions usage details of the specific time bucket.
|
|
208
265
|
#
|
|
209
|
-
# @param input_tokens [Integer] The aggregated number of
|
|
266
|
+
# @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok
|
|
210
267
|
#
|
|
211
268
|
# @param num_model_requests [Integer] The count of requests made to the model.
|
|
212
269
|
#
|
|
213
|
-
# @param output_tokens [Integer] The aggregated number of
|
|
270
|
+
# @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output
|
|
214
271
|
#
|
|
215
272
|
# @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us
|
|
216
273
|
#
|
|
217
274
|
# @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc
|
|
218
275
|
#
|
|
219
|
-
# @param input_audio_tokens [Integer] The aggregated number of audio input tokens used
|
|
276
|
+
# @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used.
|
|
220
277
|
#
|
|
221
|
-
# @param
|
|
278
|
+
# @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache.
|
|
279
|
+
#
|
|
280
|
+
# @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used.
|
|
281
|
+
#
|
|
282
|
+
# @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used.
|
|
283
|
+
#
|
|
284
|
+
# @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used.
|
|
285
|
+
#
|
|
286
|
+
# @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image
|
|
287
|
+
#
|
|
288
|
+
# @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used.
|
|
289
|
+
#
|
|
290
|
+
# @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write
|
|
291
|
+
#
|
|
292
|
+
# @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag
|
|
222
293
|
#
|
|
223
294
|
# @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r
|
|
224
295
|
#
|
|
225
296
|
# @param output_audio_tokens [Integer] The aggregated number of audio output tokens used.
|
|
226
297
|
#
|
|
298
|
+
# @param output_image_tokens [Integer] The aggregated number of image output tokens used.
|
|
299
|
+
#
|
|
300
|
+
# @param output_text_tokens [Integer] The aggregated number of text output tokens used.
|
|
301
|
+
#
|
|
227
302
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us
|
|
228
303
|
#
|
|
229
304
|
# @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe
|
|
@@ -113,8 +113,9 @@ module OpenAI
|
|
|
113
113
|
|
|
114
114
|
class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel
|
|
115
115
|
# @!attribute input_tokens
|
|
116
|
-
# The aggregated number of
|
|
117
|
-
#
|
|
116
|
+
# The aggregated number of input tokens used, including cached and cache-write
|
|
117
|
+
# tokens. This includes text, audio, and image tokens. For customers subscribed to
|
|
118
|
+
# Scale Tier, this includes Scale Tier tokens.
|
|
118
119
|
#
|
|
119
120
|
# @return [Integer]
|
|
120
121
|
required :input_tokens, Integer
|
|
@@ -131,8 +132,9 @@ module OpenAI
|
|
|
131
132
|
required :object, const: :"organization.usage.completions.result"
|
|
132
133
|
|
|
133
134
|
# @!attribute output_tokens
|
|
134
|
-
# The aggregated number of
|
|
135
|
-
#
|
|
135
|
+
# The aggregated number of output tokens used across text, audio, and image
|
|
136
|
+
# outputs. For customers subscribed to Scale Tier, this includes Scale Tier
|
|
137
|
+
# tokens.
|
|
136
138
|
#
|
|
137
139
|
# @return [Integer]
|
|
138
140
|
required :output_tokens, Integer
|
|
@@ -152,19 +154,62 @@ module OpenAI
|
|
|
152
154
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
153
155
|
|
|
154
156
|
# @!attribute input_audio_tokens
|
|
155
|
-
# The aggregated number of audio input tokens used
|
|
157
|
+
# The aggregated number of uncached audio input tokens used.
|
|
156
158
|
#
|
|
157
159
|
# @return [Integer, nil]
|
|
158
160
|
optional :input_audio_tokens, Integer
|
|
159
161
|
|
|
162
|
+
# @!attribute input_cache_write_tokens
|
|
163
|
+
# The aggregated number of input tokens written to the cache.
|
|
164
|
+
#
|
|
165
|
+
# @return [Integer, nil]
|
|
166
|
+
optional :input_cache_write_tokens, Integer
|
|
167
|
+
|
|
168
|
+
# @!attribute input_cached_audio_tokens
|
|
169
|
+
# The aggregated number of cached audio input tokens used.
|
|
170
|
+
#
|
|
171
|
+
# @return [Integer, nil]
|
|
172
|
+
optional :input_cached_audio_tokens, Integer
|
|
173
|
+
|
|
174
|
+
# @!attribute input_cached_image_tokens
|
|
175
|
+
# The aggregated number of cached image input tokens used.
|
|
176
|
+
#
|
|
177
|
+
# @return [Integer, nil]
|
|
178
|
+
optional :input_cached_image_tokens, Integer
|
|
179
|
+
|
|
180
|
+
# @!attribute input_cached_text_tokens
|
|
181
|
+
# The aggregated number of cached text input tokens used.
|
|
182
|
+
#
|
|
183
|
+
# @return [Integer, nil]
|
|
184
|
+
optional :input_cached_text_tokens, Integer
|
|
185
|
+
|
|
160
186
|
# @!attribute input_cached_tokens
|
|
161
|
-
# The aggregated number of
|
|
162
|
-
#
|
|
163
|
-
# tokens.
|
|
187
|
+
# The aggregated number of cached input tokens used across text, audio, and image
|
|
188
|
+
# inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens.
|
|
164
189
|
#
|
|
165
190
|
# @return [Integer, nil]
|
|
166
191
|
optional :input_cached_tokens, Integer
|
|
167
192
|
|
|
193
|
+
# @!attribute input_image_tokens
|
|
194
|
+
# The aggregated number of uncached image input tokens used.
|
|
195
|
+
#
|
|
196
|
+
# @return [Integer, nil]
|
|
197
|
+
optional :input_image_tokens, Integer
|
|
198
|
+
|
|
199
|
+
# @!attribute input_text_tokens
|
|
200
|
+
# The aggregated number of uncached text input tokens used, excluding cache-write
|
|
201
|
+
# tokens.
|
|
202
|
+
#
|
|
203
|
+
# @return [Integer, nil]
|
|
204
|
+
optional :input_text_tokens, Integer
|
|
205
|
+
|
|
206
|
+
# @!attribute input_uncached_tokens
|
|
207
|
+
# The aggregated number of uncached input tokens used across text, audio, and
|
|
208
|
+
# image inputs, excluding cache-write tokens.
|
|
209
|
+
#
|
|
210
|
+
# @return [Integer, nil]
|
|
211
|
+
optional :input_uncached_tokens, Integer
|
|
212
|
+
|
|
168
213
|
# @!attribute model
|
|
169
214
|
# When `group_by=model`, this field provides the model name of the grouped usage
|
|
170
215
|
# result.
|
|
@@ -178,6 +223,18 @@ module OpenAI
|
|
|
178
223
|
# @return [Integer, nil]
|
|
179
224
|
optional :output_audio_tokens, Integer
|
|
180
225
|
|
|
226
|
+
# @!attribute output_image_tokens
|
|
227
|
+
# The aggregated number of image output tokens used.
|
|
228
|
+
#
|
|
229
|
+
# @return [Integer, nil]
|
|
230
|
+
optional :output_image_tokens, Integer
|
|
231
|
+
|
|
232
|
+
# @!attribute output_text_tokens
|
|
233
|
+
# The aggregated number of text output tokens used.
|
|
234
|
+
#
|
|
235
|
+
# @return [Integer, nil]
|
|
236
|
+
optional :output_text_tokens, Integer
|
|
237
|
+
|
|
181
238
|
# @!attribute project_id
|
|
182
239
|
# When `group_by=project_id`, this field provides the project ID of the grouped
|
|
183
240
|
# usage result.
|
|
@@ -199,31 +256,49 @@ module OpenAI
|
|
|
199
256
|
# @return [String, nil]
|
|
200
257
|
optional :user_id, String, nil?: true
|
|
201
258
|
|
|
202
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cached_tokens: nil, model: nil, output_audio_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
259
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_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")
|
|
203
260
|
# Some parameter documentations has been truncated, see
|
|
204
261
|
# {OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult}
|
|
205
262
|
# for more details.
|
|
206
263
|
#
|
|
207
264
|
# The aggregated completions usage details of the specific time bucket.
|
|
208
265
|
#
|
|
209
|
-
# @param input_tokens [Integer] The aggregated number of
|
|
266
|
+
# @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok
|
|
210
267
|
#
|
|
211
268
|
# @param num_model_requests [Integer] The count of requests made to the model.
|
|
212
269
|
#
|
|
213
|
-
# @param output_tokens [Integer] The aggregated number of
|
|
270
|
+
# @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output
|
|
214
271
|
#
|
|
215
272
|
# @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us
|
|
216
273
|
#
|
|
217
274
|
# @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc
|
|
218
275
|
#
|
|
219
|
-
# @param input_audio_tokens [Integer] The aggregated number of audio input tokens used
|
|
276
|
+
# @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used.
|
|
220
277
|
#
|
|
221
|
-
# @param
|
|
278
|
+
# @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache.
|
|
279
|
+
#
|
|
280
|
+
# @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used.
|
|
281
|
+
#
|
|
282
|
+
# @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used.
|
|
283
|
+
#
|
|
284
|
+
# @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used.
|
|
285
|
+
#
|
|
286
|
+
# @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image
|
|
287
|
+
#
|
|
288
|
+
# @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used.
|
|
289
|
+
#
|
|
290
|
+
# @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write
|
|
291
|
+
#
|
|
292
|
+
# @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag
|
|
222
293
|
#
|
|
223
294
|
# @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r
|
|
224
295
|
#
|
|
225
296
|
# @param output_audio_tokens [Integer] The aggregated number of audio output tokens used.
|
|
226
297
|
#
|
|
298
|
+
# @param output_image_tokens [Integer] The aggregated number of image output tokens used.
|
|
299
|
+
#
|
|
300
|
+
# @param output_text_tokens [Integer] The aggregated number of text output tokens used.
|
|
301
|
+
#
|
|
227
302
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us
|
|
228
303
|
#
|
|
229
304
|
# @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe
|
|
@@ -113,8 +113,9 @@ module OpenAI
|
|
|
113
113
|
|
|
114
114
|
class OrganizationUsageCompletionsResult < OpenAI::Internal::Type::BaseModel
|
|
115
115
|
# @!attribute input_tokens
|
|
116
|
-
# The aggregated number of
|
|
117
|
-
#
|
|
116
|
+
# The aggregated number of input tokens used, including cached and cache-write
|
|
117
|
+
# tokens. This includes text, audio, and image tokens. For customers subscribed to
|
|
118
|
+
# Scale Tier, this includes Scale Tier tokens.
|
|
118
119
|
#
|
|
119
120
|
# @return [Integer]
|
|
120
121
|
required :input_tokens, Integer
|
|
@@ -131,8 +132,9 @@ module OpenAI
|
|
|
131
132
|
required :object, const: :"organization.usage.completions.result"
|
|
132
133
|
|
|
133
134
|
# @!attribute output_tokens
|
|
134
|
-
# The aggregated number of
|
|
135
|
-
#
|
|
135
|
+
# The aggregated number of output tokens used across text, audio, and image
|
|
136
|
+
# outputs. For customers subscribed to Scale Tier, this includes Scale Tier
|
|
137
|
+
# tokens.
|
|
136
138
|
#
|
|
137
139
|
# @return [Integer]
|
|
138
140
|
required :output_tokens, Integer
|
|
@@ -152,19 +154,62 @@ module OpenAI
|
|
|
152
154
|
optional :batch, OpenAI::Internal::Type::Boolean, nil?: true
|
|
153
155
|
|
|
154
156
|
# @!attribute input_audio_tokens
|
|
155
|
-
# The aggregated number of audio input tokens used
|
|
157
|
+
# The aggregated number of uncached audio input tokens used.
|
|
156
158
|
#
|
|
157
159
|
# @return [Integer, nil]
|
|
158
160
|
optional :input_audio_tokens, Integer
|
|
159
161
|
|
|
162
|
+
# @!attribute input_cache_write_tokens
|
|
163
|
+
# The aggregated number of input tokens written to the cache.
|
|
164
|
+
#
|
|
165
|
+
# @return [Integer, nil]
|
|
166
|
+
optional :input_cache_write_tokens, Integer
|
|
167
|
+
|
|
168
|
+
# @!attribute input_cached_audio_tokens
|
|
169
|
+
# The aggregated number of cached audio input tokens used.
|
|
170
|
+
#
|
|
171
|
+
# @return [Integer, nil]
|
|
172
|
+
optional :input_cached_audio_tokens, Integer
|
|
173
|
+
|
|
174
|
+
# @!attribute input_cached_image_tokens
|
|
175
|
+
# The aggregated number of cached image input tokens used.
|
|
176
|
+
#
|
|
177
|
+
# @return [Integer, nil]
|
|
178
|
+
optional :input_cached_image_tokens, Integer
|
|
179
|
+
|
|
180
|
+
# @!attribute input_cached_text_tokens
|
|
181
|
+
# The aggregated number of cached text input tokens used.
|
|
182
|
+
#
|
|
183
|
+
# @return [Integer, nil]
|
|
184
|
+
optional :input_cached_text_tokens, Integer
|
|
185
|
+
|
|
160
186
|
# @!attribute input_cached_tokens
|
|
161
|
-
# The aggregated number of
|
|
162
|
-
#
|
|
163
|
-
# tokens.
|
|
187
|
+
# The aggregated number of cached input tokens used across text, audio, and image
|
|
188
|
+
# inputs. For customers subscribed to Scale Tier, this includes Scale Tier tokens.
|
|
164
189
|
#
|
|
165
190
|
# @return [Integer, nil]
|
|
166
191
|
optional :input_cached_tokens, Integer
|
|
167
192
|
|
|
193
|
+
# @!attribute input_image_tokens
|
|
194
|
+
# The aggregated number of uncached image input tokens used.
|
|
195
|
+
#
|
|
196
|
+
# @return [Integer, nil]
|
|
197
|
+
optional :input_image_tokens, Integer
|
|
198
|
+
|
|
199
|
+
# @!attribute input_text_tokens
|
|
200
|
+
# The aggregated number of uncached text input tokens used, excluding cache-write
|
|
201
|
+
# tokens.
|
|
202
|
+
#
|
|
203
|
+
# @return [Integer, nil]
|
|
204
|
+
optional :input_text_tokens, Integer
|
|
205
|
+
|
|
206
|
+
# @!attribute input_uncached_tokens
|
|
207
|
+
# The aggregated number of uncached input tokens used across text, audio, and
|
|
208
|
+
# image inputs, excluding cache-write tokens.
|
|
209
|
+
#
|
|
210
|
+
# @return [Integer, nil]
|
|
211
|
+
optional :input_uncached_tokens, Integer
|
|
212
|
+
|
|
168
213
|
# @!attribute model
|
|
169
214
|
# When `group_by=model`, this field provides the model name of the grouped usage
|
|
170
215
|
# result.
|
|
@@ -178,6 +223,18 @@ module OpenAI
|
|
|
178
223
|
# @return [Integer, nil]
|
|
179
224
|
optional :output_audio_tokens, Integer
|
|
180
225
|
|
|
226
|
+
# @!attribute output_image_tokens
|
|
227
|
+
# The aggregated number of image output tokens used.
|
|
228
|
+
#
|
|
229
|
+
# @return [Integer, nil]
|
|
230
|
+
optional :output_image_tokens, Integer
|
|
231
|
+
|
|
232
|
+
# @!attribute output_text_tokens
|
|
233
|
+
# The aggregated number of text output tokens used.
|
|
234
|
+
#
|
|
235
|
+
# @return [Integer, nil]
|
|
236
|
+
optional :output_text_tokens, Integer
|
|
237
|
+
|
|
181
238
|
# @!attribute project_id
|
|
182
239
|
# When `group_by=project_id`, this field provides the project ID of the grouped
|
|
183
240
|
# usage result.
|
|
@@ -199,31 +256,49 @@ module OpenAI
|
|
|
199
256
|
# @return [String, nil]
|
|
200
257
|
optional :user_id, String, nil?: true
|
|
201
258
|
|
|
202
|
-
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_tokens: nil, input_cached_tokens: nil, model: nil, output_audio_tokens: nil, project_id: nil, service_tier: nil, user_id: nil, object: :"organization.usage.completions.result")
|
|
259
|
+
# @!method initialize(input_tokens:, num_model_requests:, output_tokens:, api_key_id: nil, batch: nil, input_audio_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")
|
|
203
260
|
# Some parameter documentations has been truncated, see
|
|
204
261
|
# {OpenAI::Models::Admin::Organization::UsageImagesResponse::Data::Result::OrganizationUsageCompletionsResult}
|
|
205
262
|
# for more details.
|
|
206
263
|
#
|
|
207
264
|
# The aggregated completions usage details of the specific time bucket.
|
|
208
265
|
#
|
|
209
|
-
# @param input_tokens [Integer] The aggregated number of
|
|
266
|
+
# @param input_tokens [Integer] The aggregated number of input tokens used, including cached and cache-write tok
|
|
210
267
|
#
|
|
211
268
|
# @param num_model_requests [Integer] The count of requests made to the model.
|
|
212
269
|
#
|
|
213
|
-
# @param output_tokens [Integer] The aggregated number of
|
|
270
|
+
# @param output_tokens [Integer] The aggregated number of output tokens used across text, audio, and image output
|
|
214
271
|
#
|
|
215
272
|
# @param api_key_id [String, nil] When `group_by=api_key_id`, this field provides the API key ID of the grouped us
|
|
216
273
|
#
|
|
217
274
|
# @param batch [Boolean, nil] When `group_by=batch`, this field tells whether the grouped usage result is batc
|
|
218
275
|
#
|
|
219
|
-
# @param input_audio_tokens [Integer] The aggregated number of audio input tokens used
|
|
276
|
+
# @param input_audio_tokens [Integer] The aggregated number of uncached audio input tokens used.
|
|
220
277
|
#
|
|
221
|
-
# @param
|
|
278
|
+
# @param input_cache_write_tokens [Integer] The aggregated number of input tokens written to the cache.
|
|
279
|
+
#
|
|
280
|
+
# @param input_cached_audio_tokens [Integer] The aggregated number of cached audio input tokens used.
|
|
281
|
+
#
|
|
282
|
+
# @param input_cached_image_tokens [Integer] The aggregated number of cached image input tokens used.
|
|
283
|
+
#
|
|
284
|
+
# @param input_cached_text_tokens [Integer] The aggregated number of cached text input tokens used.
|
|
285
|
+
#
|
|
286
|
+
# @param input_cached_tokens [Integer] The aggregated number of cached input tokens used across text, audio, and image
|
|
287
|
+
#
|
|
288
|
+
# @param input_image_tokens [Integer] The aggregated number of uncached image input tokens used.
|
|
289
|
+
#
|
|
290
|
+
# @param input_text_tokens [Integer] The aggregated number of uncached text input tokens used, excluding cache-write
|
|
291
|
+
#
|
|
292
|
+
# @param input_uncached_tokens [Integer] The aggregated number of uncached input tokens used across text, audio, and imag
|
|
222
293
|
#
|
|
223
294
|
# @param model [String, nil] When `group_by=model`, this field provides the model name of the grouped usage r
|
|
224
295
|
#
|
|
225
296
|
# @param output_audio_tokens [Integer] The aggregated number of audio output tokens used.
|
|
226
297
|
#
|
|
298
|
+
# @param output_image_tokens [Integer] The aggregated number of image output tokens used.
|
|
299
|
+
#
|
|
300
|
+
# @param output_text_tokens [Integer] The aggregated number of text output tokens used.
|
|
301
|
+
#
|
|
227
302
|
# @param project_id [String, nil] When `group_by=project_id`, this field provides the project ID of the grouped us
|
|
228
303
|
#
|
|
229
304
|
# @param service_tier [String, nil] When `group_by=service_tier`, this field provides the service tier of the groupe
|