openai 0.98.0 → 0.100.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 +26 -0
- data/README.md +1 -1
- data/bedrock.md +17 -1
- data/lib/openai/client.rb +9 -0
- data/lib/openai/helpers/agents/session_stream.rb +11 -36
- data/lib/openai/helpers/agents/tools.rb +34 -4
- data/lib/openai/helpers/beta/agents/creation_stream.rb +26 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +11 -4
- data/lib/openai/helpers/beta/agents/tool_dispatcher.rb +74 -0
- data/lib/openai/helpers/beta/agents/tool_error.rb +28 -0
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_completions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
- data/lib/openai/models/admin/organization/usage_costs_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_images_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +140 -5
- data/lib/openai/models/all_models.rb +42 -0
- data/lib/openai/models/audio/speech_create_params.rb +6 -0
- data/lib/openai/models/audio/voice.rb +75 -0
- data/lib/openai/models/audio/voice_create_params.rb +217 -0
- data/lib/openai/models/beta/agent_create_params.rb +0 -3
- data/lib/openai/models/beta/agent_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +6 -6
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +3 -6
- data/lib/openai/models/beta/agents/session_create_params.rb +0 -3
- data/lib/openai/models/beta/agents/session_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/sessions/turns/item_list_params.rb +79 -0
- data/lib/openai/models/beta/beta_response.rb +220 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/beta/beta_response_error.rb +12 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
- data/lib/openai/models/beta/beta_responses_server_event.rb +12 -1
- data/lib/openai/models/beta/beta_tool.rb +15 -18
- data/lib/openai/models/beta/environment_param.rb +6 -6
- data/lib/openai/models/beta/response_compact_params.rb +220 -0
- data/lib/openai/models/beta/response_create_params.rb +220 -0
- data/lib/openai/models/beta/session_turn_error.rb +9 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
- data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
- data/lib/openai/models/chat_model.rb +178 -0
- data/lib/openai/models/error_object.rb +12 -1
- data/lib/openai/models/eval_create_params.rb +1 -1
- data/lib/openai/models/eval_create_response.rb +1 -1
- data/lib/openai/models/eval_list_response.rb +1 -1
- data/lib/openai/models/eval_retrieve_response.rb +1 -1
- data/lib/openai/models/eval_update_response.rb +1 -1
- data/lib/openai/models/fine_tuning/job_list_params.rb +14 -4
- data/lib/openai/models/graders/score_model_grader.rb +2 -2
- data/lib/openai/models/image.rb +14 -14
- data/lib/openai/models/image_create_variation_params.rb +7 -7
- data/lib/openai/models/image_edit_params.rb +88 -96
- data/lib/openai/models/image_generate_params.rb +51 -62
- data/lib/openai/models/image_model.rb +5 -3
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -6
- data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -6
- data/lib/openai/models/realtime/session_update_event.rb +16 -0
- data/lib/openai/models/responses/response_compact_params.rb +220 -0
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/responses/response_error.rb +12 -1
- data/lib/openai/models/responses/responses_server_event.rb +12 -1
- data/lib/openai/models/responses/tool.rb +15 -18
- data/lib/openai/models/responses_model.rb +42 -0
- data/lib/openai/models/video_create_error.rb +12 -1
- data/lib/openai/models/webhooks/agent_session_action_required_webhook_event.rb +109 -0
- data/lib/openai/models/webhooks/agent_session_created_webhook_event.rb +106 -0
- data/lib/openai/models/webhooks/agent_session_failed_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_idle_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_in_progress_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +18 -2
- data/lib/openai/models/webhooks/webhook_create_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +5 -0
- data/lib/openai/providers/bedrock.rb +20 -1
- data/lib/openai/resources/admin/organization/usage.rb +15 -6
- data/lib/openai/resources/audio/speech.rb +2 -0
- data/lib/openai/resources/audio/voices.rb +53 -0
- data/lib/openai/resources/audio.rb +5 -0
- data/lib/openai/resources/beta/agents/environments/templates.rb +3 -4
- data/lib/openai/resources/beta/agents/sessions/turns/items.rb +68 -0
- data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -2
- data/lib/openai/resources/fine_tuning/jobs.rb +7 -2
- data/lib/openai/resources/images.rb +79 -109
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +10 -0
- data/rbi/openai/helpers/agents.rbi +2 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +8 -3
- data/rbi/openai/helpers/beta/agents/tool_error.rbi +19 -0
- data/rbi/openai/helpers/beta/agents.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_web_search_calls_params.rbi +12 -4
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +213 -3
- data/rbi/openai/models/audio/speech_create_params.rbi +6 -0
- data/rbi/openai/models/audio/voice.rbi +111 -0
- data/rbi/openai/models/audio/voice_create_params.rbi +321 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agent_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +6 -6
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +3 -6
- data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/sessions/turns/item_list_params.rbi +139 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_error.rbi +12 -0
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +12 -0
- data/rbi/openai/models/beta/beta_tool.rbi +15 -18
- data/rbi/openai/models/beta/environment_param.rbi +6 -6
- data/rbi/openai/models/beta/session_turn_error.rbi +18 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +123 -17
- data/rbi/openai/models/error_object.rbi +12 -0
- data/rbi/openai/models/eval_create_params.rbi +1 -1
- data/rbi/openai/models/eval_create_response.rbi +1 -1
- data/rbi/openai/models/eval_list_response.rbi +1 -1
- data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
- data/rbi/openai/models/eval_update_response.rbi +1 -1
- data/rbi/openai/models/fine_tuning/job_list_params.rbi +14 -4
- data/rbi/openai/models/graders/score_model_grader.rbi +2 -2
- data/rbi/openai/models/image.rbi +14 -14
- data/rbi/openai/models/image_create_variation_params.rbi +6 -6
- data/rbi/openai/models/image_edit_params.rbi +73 -91
- data/rbi/openai/models/image_generate_params.rbi +30 -61
- data/rbi/openai/models/image_model.rbi +3 -3
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +9 -6
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +9 -6
- data/rbi/openai/models/realtime/session_update_event.rbi +16 -0
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/responses/response_error.rbi +12 -0
- data/rbi/openai/models/responses/responses_server_event.rbi +12 -0
- data/rbi/openai/models/responses/tool.rbi +15 -18
- data/rbi/openai/models/video_create_error.rbi +12 -0
- data/rbi/openai/models/webhooks/agent_session_action_required_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/agent_session_created_webhook_event.rbi +202 -0
- data/rbi/openai/models/webhooks/agent_session_failed_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_idle_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_in_progress_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +7 -1
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +20 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +15 -6
- data/rbi/openai/resources/audio/speech.rbi +2 -0
- data/rbi/openai/resources/audio/voices.rbi +49 -0
- data/rbi/openai/resources/audio.rbi +4 -0
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +3 -4
- data/rbi/openai/resources/beta/agents/sessions/turns/items.rbi +62 -0
- data/rbi/openai/resources/beta/agents/sessions/turns.rbi +3 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +2 -0
- data/rbi/openai/resources/fine_tuning/jobs.rbi +7 -2
- data/rbi/openai/resources/images.rbi +77 -109
- data/rbi/openai/resources/webhooks.rbi +5 -0
- data/sig/openai/helpers/agents.rbs +3 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +5 -2
- data/sig/openai/helpers/beta/agents/tool_error.rbs +17 -0
- data/sig/openai/helpers/beta/agents.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_images_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +19 -7
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +107 -5
- data/sig/openai/models/audio/speech_create_params.rbs +4 -0
- data/sig/openai/models/audio/voice.rbs +70 -0
- data/sig/openai/models/audio/voice_create_params.rbs +203 -0
- data/sig/openai/models/beta/agent_create_params.rbs +1 -5
- data/sig/openai/models/beta/agent_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +4 -4
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +2 -4
- data/sig/openai/models/beta/agents/session_create_params.rbs +1 -5
- data/sig/openai/models/beta/agents/session_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/sessions/turns/item_list_params.rbs +91 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/beta/beta_response_error.rbs +10 -0
- data/sig/openai/models/beta/beta_responses_server_event.rbs +10 -0
- data/sig/openai/models/beta/beta_tool.rbs +11 -15
- data/sig/openai/models/beta/environment_param.rbs +4 -4
- data/sig/openai/models/beta/session_turn_error.rbs +12 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
- data/sig/openai/models/chat/chat_completion_chunk.rbs +96 -12
- data/sig/openai/models/error_object.rbs +10 -0
- data/sig/openai/models/eval_create_params.rbs +1 -1
- data/sig/openai/models/eval_create_response.rbs +1 -1
- data/sig/openai/models/eval_list_response.rbs +1 -1
- data/sig/openai/models/eval_retrieve_response.rbs +1 -1
- data/sig/openai/models/eval_update_response.rbs +1 -1
- data/sig/openai/models/fine_tuning/job_list_params.rbs +14 -4
- data/sig/openai/models/graders/score_model_grader.rbs +3 -3
- data/sig/openai/models/image.rbs +21 -21
- data/sig/openai/models/image_create_variation_params.rbs +4 -4
- data/sig/openai/models/image_edit_params.rbs +54 -66
- data/sig/openai/models/image_generate_params.rbs +23 -45
- data/sig/openai/models/image_model.rbs +6 -6
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +9 -6
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +9 -6
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +10 -0
- data/sig/openai/models/responses/responses_server_event.rbs +10 -0
- data/sig/openai/models/responses/tool.rbs +11 -15
- data/sig/openai/models/video_create_error.rbs +10 -0
- data/sig/openai/models/webhooks/agent_session_action_required_webhook_event.rbs +114 -0
- data/sig/openai/models/webhooks/agent_session_created_webhook_event.rbs +115 -0
- data/sig/openai/models/webhooks/agent_session_failed_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_idle_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_in_progress_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +6 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +10 -0
- data/sig/openai/resources/audio/voices.rbs +14 -0
- data/sig/openai/resources/audio.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions/turns/items.rbs +24 -0
- data/sig/openai/resources/beta/agents/sessions/turns.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
- data/sig/openai/resources/webhooks.rbs +6 -1
- metadata +35 -1
|
@@ -196,6 +196,21 @@ module OpenAI
|
|
|
196
196
|
# @return [String, nil]
|
|
197
197
|
optional :api_key_id, String, nil?: true
|
|
198
198
|
|
|
199
|
+
# @!attribute api_source
|
|
200
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
201
|
+
# activity and `unlabeled` includes all records without published source
|
|
202
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
203
|
+
# direct API usage. Without source grouping, this field is null.
|
|
204
|
+
#
|
|
205
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource, nil]
|
|
206
|
+
optional(
|
|
207
|
+
:api_source,
|
|
208
|
+
enum: -> {
|
|
209
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
|
|
210
|
+
},
|
|
211
|
+
nil?: true
|
|
212
|
+
)
|
|
213
|
+
|
|
199
214
|
# @!attribute batch
|
|
200
215
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
201
216
|
# batch or not.
|
|
@@ -209,8 +224,16 @@ module OpenAI
|
|
|
209
224
|
# @return [Integer, nil]
|
|
210
225
|
optional :input_audio_tokens, Integer
|
|
211
226
|
|
|
227
|
+
# @!attribute input_cache_write_12h_tokens
|
|
228
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
229
|
+
# retention period.
|
|
230
|
+
#
|
|
231
|
+
# @return [Integer, nil]
|
|
232
|
+
optional :input_cache_write_12h_tokens, Integer
|
|
233
|
+
|
|
212
234
|
# @!attribute input_cache_write_tokens
|
|
213
|
-
# The aggregated number of input tokens written to the cache
|
|
235
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
236
|
+
# retention period.
|
|
214
237
|
#
|
|
215
238
|
# @return [Integer, nil]
|
|
216
239
|
optional :input_cache_write_tokens, Integer
|
|
@@ -306,7 +329,7 @@ module OpenAI
|
|
|
306
329
|
# @return [String, nil]
|
|
307
330
|
optional :user_id, String, nil?: true
|
|
308
331
|
|
|
309
|
-
# @!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")
|
|
332
|
+
# @!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_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")
|
|
310
333
|
# The aggregated completions usage details of the specific time bucket.
|
|
311
334
|
#
|
|
312
335
|
# @param input_tokens [Integer]
|
|
@@ -326,6 +349,12 @@ module OpenAI
|
|
|
326
349
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
327
350
|
# usage result.
|
|
328
351
|
#
|
|
352
|
+
# @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource, nil]
|
|
353
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
354
|
+
# activity and `unlabeled` includes all records without published source
|
|
355
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
356
|
+
# direct API usage. Without source grouping, this field is null.
|
|
357
|
+
#
|
|
329
358
|
# @param batch [Boolean, nil]
|
|
330
359
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
331
360
|
# batch or not.
|
|
@@ -333,8 +362,13 @@ module OpenAI
|
|
|
333
362
|
# @param input_audio_tokens [Integer]
|
|
334
363
|
# The aggregated number of uncached audio input tokens used.
|
|
335
364
|
#
|
|
365
|
+
# @param input_cache_write_12h_tokens [Integer]
|
|
366
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
367
|
+
# retention period.
|
|
368
|
+
#
|
|
336
369
|
# @param input_cache_write_tokens [Integer]
|
|
337
|
-
# The aggregated number of input tokens written to the cache
|
|
370
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
371
|
+
# retention period.
|
|
338
372
|
#
|
|
339
373
|
# @param input_cached_audio_tokens [Integer]
|
|
340
374
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -386,6 +420,22 @@ module OpenAI
|
|
|
386
420
|
# result.
|
|
387
421
|
#
|
|
388
422
|
# @param object [Symbol, :"organization.usage.completions.result"]
|
|
423
|
+
|
|
424
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
425
|
+
# activity and `unlabeled` includes all records without published source
|
|
426
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
427
|
+
# direct API usage. Without source grouping, this field is null.
|
|
428
|
+
#
|
|
429
|
+
# @see OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageCompletionsResult#api_source
|
|
430
|
+
module APISource
|
|
431
|
+
extend OpenAI::Internal::Type::Enum
|
|
432
|
+
|
|
433
|
+
AGENTS_API = :agents_api
|
|
434
|
+
UNLABELED = :unlabeled
|
|
435
|
+
|
|
436
|
+
# @!method self.values
|
|
437
|
+
# @return [Array<Symbol>]
|
|
438
|
+
end
|
|
389
439
|
end
|
|
390
440
|
|
|
391
441
|
class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -935,6 +985,21 @@ module OpenAI
|
|
|
935
985
|
# @return [String, nil]
|
|
936
986
|
optional :api_key_id, String, nil?: true
|
|
937
987
|
|
|
988
|
+
# @!attribute api_source
|
|
989
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
990
|
+
# activity and `unlabeled` includes all records without published source
|
|
991
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
992
|
+
# direct API usage. Without source grouping, this field is null.
|
|
993
|
+
#
|
|
994
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource, nil]
|
|
995
|
+
optional(
|
|
996
|
+
:api_source,
|
|
997
|
+
enum: -> {
|
|
998
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
|
|
999
|
+
},
|
|
1000
|
+
nil?: true
|
|
1001
|
+
)
|
|
1002
|
+
|
|
938
1003
|
# @!attribute context_level
|
|
939
1004
|
# When `group_by=context_level`, this field provides the search context size of
|
|
940
1005
|
# the grouped usage result.
|
|
@@ -963,7 +1028,7 @@ module OpenAI
|
|
|
963
1028
|
# @return [String, nil]
|
|
964
1029
|
optional :user_id, String, nil?: true
|
|
965
1030
|
|
|
966
|
-
# @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result")
|
|
1031
|
+
# @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, api_source: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result")
|
|
967
1032
|
# The aggregated web search calls usage details of the specific time bucket.
|
|
968
1033
|
#
|
|
969
1034
|
# @param num_model_requests [Integer]
|
|
@@ -976,6 +1041,12 @@ module OpenAI
|
|
|
976
1041
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
977
1042
|
# usage result.
|
|
978
1043
|
#
|
|
1044
|
+
# @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource, nil]
|
|
1045
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1046
|
+
# activity and `unlabeled` includes all records without published source
|
|
1047
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1048
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1049
|
+
#
|
|
979
1050
|
# @param context_level [String, nil]
|
|
980
1051
|
# When `group_by=context_level`, this field provides the search context size of
|
|
981
1052
|
# the grouped usage result.
|
|
@@ -993,6 +1064,22 @@ module OpenAI
|
|
|
993
1064
|
# result.
|
|
994
1065
|
#
|
|
995
1066
|
# @param object [Symbol, :"organization.usage.web_searches.result"]
|
|
1067
|
+
|
|
1068
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1069
|
+
# activity and `unlabeled` includes all records without published source
|
|
1070
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1071
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1072
|
+
#
|
|
1073
|
+
# @see OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationUsageWebSearchesResult#api_source
|
|
1074
|
+
module APISource
|
|
1075
|
+
extend OpenAI::Internal::Type::Enum
|
|
1076
|
+
|
|
1077
|
+
AGENTS_API = :agents_api
|
|
1078
|
+
UNLABELED = :unlabeled
|
|
1079
|
+
|
|
1080
|
+
# @!method self.values
|
|
1081
|
+
# @return [Array<Symbol>]
|
|
1082
|
+
end
|
|
996
1083
|
end
|
|
997
1084
|
|
|
998
1085
|
class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1019,6 +1106,21 @@ module OpenAI
|
|
|
1019
1106
|
# @return [String, nil]
|
|
1020
1107
|
optional :api_key_id, String, nil?: true
|
|
1021
1108
|
|
|
1109
|
+
# @!attribute api_source
|
|
1110
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1111
|
+
# activity and `unlabeled` includes all records without published source
|
|
1112
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1113
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1114
|
+
#
|
|
1115
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::APISource, nil]
|
|
1116
|
+
optional(
|
|
1117
|
+
:api_source,
|
|
1118
|
+
enum: -> {
|
|
1119
|
+
OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::APISource
|
|
1120
|
+
},
|
|
1121
|
+
nil?: true
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1022
1124
|
# @!attribute line_item
|
|
1023
1125
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1024
1126
|
# costs result.
|
|
@@ -1053,7 +1155,14 @@ module OpenAI
|
|
|
1053
1155
|
nil?: true
|
|
1054
1156
|
)
|
|
1055
1157
|
|
|
1056
|
-
# @!
|
|
1158
|
+
# @!attribute user_id
|
|
1159
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1160
|
+
# result.
|
|
1161
|
+
#
|
|
1162
|
+
# @return [String, nil]
|
|
1163
|
+
optional :user_id, String, nil?: true
|
|
1164
|
+
|
|
1165
|
+
# @!method initialize(amount: nil, api_key_id: nil, api_source: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, user_id: nil, object: :"organization.costs.result")
|
|
1057
1166
|
# The aggregated costs details of the specific time bucket.
|
|
1058
1167
|
#
|
|
1059
1168
|
# @param amount [OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::Amount]
|
|
@@ -1063,6 +1172,12 @@ module OpenAI
|
|
|
1063
1172
|
# When `group_by=api_key_id`, this field provides the API Key ID of the grouped
|
|
1064
1173
|
# costs result.
|
|
1065
1174
|
#
|
|
1175
|
+
# @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult::APISource, nil]
|
|
1176
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1177
|
+
# activity and `unlabeled` includes all records without published source
|
|
1178
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1179
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1180
|
+
#
|
|
1066
1181
|
# @param line_item [String, nil]
|
|
1067
1182
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1068
1183
|
# costs result.
|
|
@@ -1079,6 +1194,10 @@ module OpenAI
|
|
|
1079
1194
|
# The unit of the `quantity` value. If no single supported unit applies to the
|
|
1080
1195
|
# result, this field is `null`.
|
|
1081
1196
|
#
|
|
1197
|
+
# @param user_id [String, nil]
|
|
1198
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1199
|
+
# result.
|
|
1200
|
+
#
|
|
1082
1201
|
# @param object [Symbol, :"organization.costs.result"]
|
|
1083
1202
|
|
|
1084
1203
|
# @see OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -1104,6 +1223,22 @@ module OpenAI
|
|
|
1104
1223
|
# @param value [Float]
|
|
1105
1224
|
# The numeric value of the cost.
|
|
1106
1225
|
end
|
|
1226
|
+
|
|
1227
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1228
|
+
# activity and `unlabeled` includes all records without published source
|
|
1229
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1230
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1231
|
+
#
|
|
1232
|
+
# @see OpenAI::Models::Admin::Organization::UsageCostsResponse::Data::Result::OrganizationCostsResult#api_source
|
|
1233
|
+
module APISource
|
|
1234
|
+
extend OpenAI::Internal::Type::Enum
|
|
1235
|
+
|
|
1236
|
+
AGENTS_API = :agents_api
|
|
1237
|
+
UNLABELED = :unlabeled
|
|
1238
|
+
|
|
1239
|
+
# @!method self.values
|
|
1240
|
+
# @return [Array<Symbol>]
|
|
1241
|
+
end
|
|
1107
1242
|
end
|
|
1108
1243
|
|
|
1109
1244
|
# @!method self.variants
|
|
@@ -198,6 +198,21 @@ module OpenAI
|
|
|
198
198
|
# @return [String, nil]
|
|
199
199
|
optional :api_key_id, String, nil?: true
|
|
200
200
|
|
|
201
|
+
# @!attribute api_source
|
|
202
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
203
|
+
# activity and `unlabeled` includes all records without published source
|
|
204
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
205
|
+
# direct API usage. Without source grouping, this field is null.
|
|
206
|
+
#
|
|
207
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource, nil]
|
|
208
|
+
optional(
|
|
209
|
+
:api_source,
|
|
210
|
+
enum: -> {
|
|
211
|
+
OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
|
|
212
|
+
},
|
|
213
|
+
nil?: true
|
|
214
|
+
)
|
|
215
|
+
|
|
201
216
|
# @!attribute batch
|
|
202
217
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
203
218
|
# batch or not.
|
|
@@ -211,8 +226,16 @@ module OpenAI
|
|
|
211
226
|
# @return [Integer, nil]
|
|
212
227
|
optional :input_audio_tokens, Integer
|
|
213
228
|
|
|
229
|
+
# @!attribute input_cache_write_12h_tokens
|
|
230
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
231
|
+
# retention period.
|
|
232
|
+
#
|
|
233
|
+
# @return [Integer, nil]
|
|
234
|
+
optional :input_cache_write_12h_tokens, Integer
|
|
235
|
+
|
|
214
236
|
# @!attribute input_cache_write_tokens
|
|
215
|
-
# The aggregated number of input tokens written to the cache
|
|
237
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
238
|
+
# retention period.
|
|
216
239
|
#
|
|
217
240
|
# @return [Integer, nil]
|
|
218
241
|
optional :input_cache_write_tokens, Integer
|
|
@@ -308,7 +331,7 @@ module OpenAI
|
|
|
308
331
|
# @return [String, nil]
|
|
309
332
|
optional :user_id, String, nil?: true
|
|
310
333
|
|
|
311
|
-
# @!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")
|
|
334
|
+
# @!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_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")
|
|
312
335
|
# The aggregated completions usage details of the specific time bucket.
|
|
313
336
|
#
|
|
314
337
|
# @param input_tokens [Integer]
|
|
@@ -328,6 +351,12 @@ module OpenAI
|
|
|
328
351
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
329
352
|
# usage result.
|
|
330
353
|
#
|
|
354
|
+
# @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource, nil]
|
|
355
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
356
|
+
# activity and `unlabeled` includes all records without published source
|
|
357
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
358
|
+
# direct API usage. Without source grouping, this field is null.
|
|
359
|
+
#
|
|
331
360
|
# @param batch [Boolean, nil]
|
|
332
361
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
333
362
|
# batch or not.
|
|
@@ -335,8 +364,13 @@ module OpenAI
|
|
|
335
364
|
# @param input_audio_tokens [Integer]
|
|
336
365
|
# The aggregated number of uncached audio input tokens used.
|
|
337
366
|
#
|
|
367
|
+
# @param input_cache_write_12h_tokens [Integer]
|
|
368
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
369
|
+
# retention period.
|
|
370
|
+
#
|
|
338
371
|
# @param input_cache_write_tokens [Integer]
|
|
339
|
-
# The aggregated number of input tokens written to the cache
|
|
372
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
373
|
+
# retention period.
|
|
340
374
|
#
|
|
341
375
|
# @param input_cached_audio_tokens [Integer]
|
|
342
376
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -388,6 +422,22 @@ module OpenAI
|
|
|
388
422
|
# result.
|
|
389
423
|
#
|
|
390
424
|
# @param object [Symbol, :"organization.usage.completions.result"]
|
|
425
|
+
|
|
426
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
427
|
+
# activity and `unlabeled` includes all records without published source
|
|
428
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
429
|
+
# direct API usage. Without source grouping, this field is null.
|
|
430
|
+
#
|
|
431
|
+
# @see OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageCompletionsResult#api_source
|
|
432
|
+
module APISource
|
|
433
|
+
extend OpenAI::Internal::Type::Enum
|
|
434
|
+
|
|
435
|
+
AGENTS_API = :agents_api
|
|
436
|
+
UNLABELED = :unlabeled
|
|
437
|
+
|
|
438
|
+
# @!method self.values
|
|
439
|
+
# @return [Array<Symbol>]
|
|
440
|
+
end
|
|
391
441
|
end
|
|
392
442
|
|
|
393
443
|
class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -937,6 +987,21 @@ module OpenAI
|
|
|
937
987
|
# @return [String, nil]
|
|
938
988
|
optional :api_key_id, String, nil?: true
|
|
939
989
|
|
|
990
|
+
# @!attribute api_source
|
|
991
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
992
|
+
# activity and `unlabeled` includes all records without published source
|
|
993
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
994
|
+
# direct API usage. Without source grouping, this field is null.
|
|
995
|
+
#
|
|
996
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource, nil]
|
|
997
|
+
optional(
|
|
998
|
+
:api_source,
|
|
999
|
+
enum: -> {
|
|
1000
|
+
OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
|
|
1001
|
+
},
|
|
1002
|
+
nil?: true
|
|
1003
|
+
)
|
|
1004
|
+
|
|
940
1005
|
# @!attribute context_level
|
|
941
1006
|
# When `group_by=context_level`, this field provides the search context size of
|
|
942
1007
|
# the grouped usage result.
|
|
@@ -965,7 +1030,7 @@ module OpenAI
|
|
|
965
1030
|
# @return [String, nil]
|
|
966
1031
|
optional :user_id, String, nil?: true
|
|
967
1032
|
|
|
968
|
-
# @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result")
|
|
1033
|
+
# @!method initialize(num_model_requests:, num_requests:, api_key_id: nil, api_source: nil, context_level: nil, model: nil, project_id: nil, user_id: nil, object: :"organization.usage.web_searches.result")
|
|
969
1034
|
# The aggregated web search calls usage details of the specific time bucket.
|
|
970
1035
|
#
|
|
971
1036
|
# @param num_model_requests [Integer]
|
|
@@ -978,6 +1043,12 @@ module OpenAI
|
|
|
978
1043
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
979
1044
|
# usage result.
|
|
980
1045
|
#
|
|
1046
|
+
# @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource, nil]
|
|
1047
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1048
|
+
# activity and `unlabeled` includes all records without published source
|
|
1049
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1050
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1051
|
+
#
|
|
981
1052
|
# @param context_level [String, nil]
|
|
982
1053
|
# When `group_by=context_level`, this field provides the search context size of
|
|
983
1054
|
# the grouped usage result.
|
|
@@ -995,6 +1066,22 @@ module OpenAI
|
|
|
995
1066
|
# result.
|
|
996
1067
|
#
|
|
997
1068
|
# @param object [Symbol, :"organization.usage.web_searches.result"]
|
|
1069
|
+
|
|
1070
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1071
|
+
# activity and `unlabeled` includes all records without published source
|
|
1072
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1073
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1074
|
+
#
|
|
1075
|
+
# @see OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationUsageWebSearchesResult#api_source
|
|
1076
|
+
module APISource
|
|
1077
|
+
extend OpenAI::Internal::Type::Enum
|
|
1078
|
+
|
|
1079
|
+
AGENTS_API = :agents_api
|
|
1080
|
+
UNLABELED = :unlabeled
|
|
1081
|
+
|
|
1082
|
+
# @!method self.values
|
|
1083
|
+
# @return [Array<Symbol>]
|
|
1084
|
+
end
|
|
998
1085
|
end
|
|
999
1086
|
|
|
1000
1087
|
class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1021,6 +1108,21 @@ module OpenAI
|
|
|
1021
1108
|
# @return [String, nil]
|
|
1022
1109
|
optional :api_key_id, String, nil?: true
|
|
1023
1110
|
|
|
1111
|
+
# @!attribute api_source
|
|
1112
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1113
|
+
# activity and `unlabeled` includes all records without published source
|
|
1114
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1115
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1116
|
+
#
|
|
1117
|
+
# @return [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult::APISource, nil]
|
|
1118
|
+
optional(
|
|
1119
|
+
:api_source,
|
|
1120
|
+
enum: -> {
|
|
1121
|
+
OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult::APISource
|
|
1122
|
+
},
|
|
1123
|
+
nil?: true
|
|
1124
|
+
)
|
|
1125
|
+
|
|
1024
1126
|
# @!attribute line_item
|
|
1025
1127
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1026
1128
|
# costs result.
|
|
@@ -1055,7 +1157,14 @@ module OpenAI
|
|
|
1055
1157
|
nil?: true
|
|
1056
1158
|
)
|
|
1057
1159
|
|
|
1058
|
-
# @!
|
|
1160
|
+
# @!attribute user_id
|
|
1161
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1162
|
+
# result.
|
|
1163
|
+
#
|
|
1164
|
+
# @return [String, nil]
|
|
1165
|
+
optional :user_id, String, nil?: true
|
|
1166
|
+
|
|
1167
|
+
# @!method initialize(amount: nil, api_key_id: nil, api_source: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, user_id: nil, object: :"organization.costs.result")
|
|
1059
1168
|
# The aggregated costs details of the specific time bucket.
|
|
1060
1169
|
#
|
|
1061
1170
|
# @param amount [OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult::Amount]
|
|
@@ -1065,6 +1174,12 @@ module OpenAI
|
|
|
1065
1174
|
# When `group_by=api_key_id`, this field provides the API Key ID of the grouped
|
|
1066
1175
|
# costs result.
|
|
1067
1176
|
#
|
|
1177
|
+
# @param api_source [Symbol, OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult::APISource, nil]
|
|
1178
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1179
|
+
# activity and `unlabeled` includes all records without published source
|
|
1180
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1181
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1182
|
+
#
|
|
1068
1183
|
# @param line_item [String, nil]
|
|
1069
1184
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1070
1185
|
# costs result.
|
|
@@ -1081,6 +1196,10 @@ module OpenAI
|
|
|
1081
1196
|
# The unit of the `quantity` value. If no single supported unit applies to the
|
|
1082
1197
|
# result, this field is `null`.
|
|
1083
1198
|
#
|
|
1199
|
+
# @param user_id [String, nil]
|
|
1200
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1201
|
+
# result.
|
|
1202
|
+
#
|
|
1084
1203
|
# @param object [Symbol, :"organization.costs.result"]
|
|
1085
1204
|
|
|
1086
1205
|
# @see OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult#amount
|
|
@@ -1106,6 +1225,22 @@ module OpenAI
|
|
|
1106
1225
|
# @param value [Float]
|
|
1107
1226
|
# The numeric value of the cost.
|
|
1108
1227
|
end
|
|
1228
|
+
|
|
1229
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1230
|
+
# activity and `unlabeled` includes all records without published source
|
|
1231
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1232
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1233
|
+
#
|
|
1234
|
+
# @see OpenAI::Models::Admin::Organization::UsageEmbeddingsResponse::Data::Result::OrganizationCostsResult#api_source
|
|
1235
|
+
module APISource
|
|
1236
|
+
extend OpenAI::Internal::Type::Enum
|
|
1237
|
+
|
|
1238
|
+
AGENTS_API = :agents_api
|
|
1239
|
+
UNLABELED = :unlabeled
|
|
1240
|
+
|
|
1241
|
+
# @!method self.values
|
|
1242
|
+
# @return [Array<Symbol>]
|
|
1243
|
+
end
|
|
1109
1244
|
end
|
|
1110
1245
|
|
|
1111
1246
|
# @!method self.variants
|