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
|
@@ -87,8 +87,10 @@ module OpenAI
|
|
|
87
87
|
?object: :"organization.usage.completions.result",
|
|
88
88
|
output_tokens: Integer,
|
|
89
89
|
?api_key_id: String?,
|
|
90
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?,
|
|
90
91
|
?batch: bool?,
|
|
91
92
|
?input_audio_tokens: Integer,
|
|
93
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
94
|
?input_cache_write_tokens: Integer,
|
|
93
95
|
?input_cached_audio_tokens: Integer,
|
|
94
96
|
?input_cached_image_tokens: Integer,
|
|
@@ -126,6 +128,12 @@ module OpenAI
|
|
|
126
128
|
# usage result.
|
|
127
129
|
attr_accessor api_key_id: String?
|
|
128
130
|
|
|
131
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
132
|
+
# activity and `unlabeled` includes all records without published source
|
|
133
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
134
|
+
# direct API usage. Without source grouping, this field is null.
|
|
135
|
+
attr_accessor api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?
|
|
136
|
+
|
|
129
137
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
130
138
|
# batch or not.
|
|
131
139
|
attr_accessor batch: bool?
|
|
@@ -136,10 +144,20 @@ module OpenAI
|
|
|
136
144
|
# The aggregated number of uncached audio input tokens used.
|
|
137
145
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
146
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
147
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
148
|
+
# retention period.
|
|
149
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
150
|
+
|
|
151
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
152
|
+
# retention period.
|
|
153
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
|
+
|
|
155
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
|
+
# retention period.
|
|
140
157
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
158
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
159
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
160
|
+
# retention period.
|
|
143
161
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
162
|
|
|
145
163
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -237,13 +255,22 @@ module OpenAI
|
|
|
237
255
|
# @param api_key_id
|
|
238
256
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
239
257
|
# usage result.
|
|
258
|
+
# @param api_source
|
|
259
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
260
|
+
# activity and `unlabeled` includes all records without published source
|
|
261
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
262
|
+
# direct API usage. Without source grouping, this field is null.
|
|
240
263
|
# @param batch
|
|
241
264
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
242
265
|
# batch or not.
|
|
243
266
|
# @param input_audio_tokens
|
|
244
267
|
# The aggregated number of uncached audio input tokens used.
|
|
268
|
+
# @param input_cache_write_12h_tokens
|
|
269
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
270
|
+
# retention period.
|
|
245
271
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
272
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
|
+
# retention period.
|
|
247
274
|
# @param input_cached_audio_tokens
|
|
248
275
|
# The aggregated number of cached audio input tokens used.
|
|
249
276
|
# @param input_cached_image_tokens
|
|
@@ -284,8 +311,10 @@ module OpenAI
|
|
|
284
311
|
num_model_requests: Integer,
|
|
285
312
|
output_tokens: Integer,
|
|
286
313
|
?api_key_id: String?,
|
|
314
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?,
|
|
287
315
|
?batch: bool?,
|
|
288
316
|
?input_audio_tokens: Integer,
|
|
317
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
318
|
?input_cache_write_tokens: Integer,
|
|
290
319
|
?input_cached_audio_tokens: Integer,
|
|
291
320
|
?input_cached_image_tokens: Integer,
|
|
@@ -310,8 +339,10 @@ module OpenAI
|
|
|
310
339
|
?object: :"organization.usage.completions.result",
|
|
311
340
|
output_tokens: Integer,
|
|
312
341
|
?api_key_id: String?,
|
|
342
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?,
|
|
313
343
|
?batch: bool?,
|
|
314
344
|
?input_audio_tokens: Integer,
|
|
345
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
346
|
?input_cache_write_tokens: Integer,
|
|
316
347
|
?input_cached_audio_tokens: Integer,
|
|
317
348
|
?input_cached_image_tokens: Integer,
|
|
@@ -328,6 +359,17 @@ module OpenAI
|
|
|
328
359
|
?service_tier: String?,
|
|
329
360
|
?user_id: String?
|
|
330
361
|
}
|
|
362
|
+
|
|
363
|
+
type api_source = :agents_api | :unlabeled
|
|
364
|
+
|
|
365
|
+
module APISource
|
|
366
|
+
extend OpenAI::Internal::Type::Enum
|
|
367
|
+
|
|
368
|
+
AGENTS_API: :agents_api
|
|
369
|
+
UNLABELED: :unlabeled
|
|
370
|
+
|
|
371
|
+
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageCompletionsResult::api_source]
|
|
372
|
+
end
|
|
331
373
|
end
|
|
332
374
|
|
|
333
375
|
type organization_usage_embeddings_result =
|
|
@@ -856,6 +898,7 @@ module OpenAI
|
|
|
856
898
|
num_requests: Integer,
|
|
857
899
|
?object: :"organization.usage.web_searches.result",
|
|
858
900
|
?api_key_id: String?,
|
|
901
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?,
|
|
859
902
|
?context_level: String?,
|
|
860
903
|
?model: String?,
|
|
861
904
|
?project_id: String?,
|
|
@@ -875,6 +918,12 @@ module OpenAI
|
|
|
875
918
|
# usage result.
|
|
876
919
|
attr_accessor api_key_id: String?
|
|
877
920
|
|
|
921
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
922
|
+
# activity and `unlabeled` includes all records without published source
|
|
923
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
924
|
+
# direct API usage. Without source grouping, this field is null.
|
|
925
|
+
attr_accessor api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?
|
|
926
|
+
|
|
878
927
|
# When `group_by=context_level`, this field provides the search context size of
|
|
879
928
|
# the grouped usage result.
|
|
880
929
|
attr_accessor context_level: String?
|
|
@@ -898,6 +947,11 @@ module OpenAI
|
|
|
898
947
|
# @param api_key_id
|
|
899
948
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
900
949
|
# usage result.
|
|
950
|
+
# @param api_source
|
|
951
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
952
|
+
# activity and `unlabeled` includes all records without published source
|
|
953
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
954
|
+
# direct API usage. Without source grouping, this field is null.
|
|
901
955
|
# @param context_level
|
|
902
956
|
# When `group_by=context_level`, this field provides the search context size of
|
|
903
957
|
# the grouped usage result.
|
|
@@ -914,6 +968,7 @@ module OpenAI
|
|
|
914
968
|
num_model_requests: Integer,
|
|
915
969
|
num_requests: Integer,
|
|
916
970
|
?api_key_id: String?,
|
|
971
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?,
|
|
917
972
|
?context_level: String?,
|
|
918
973
|
?model: String?,
|
|
919
974
|
?project_id: String?,
|
|
@@ -926,11 +981,23 @@ module OpenAI
|
|
|
926
981
|
num_requests: Integer,
|
|
927
982
|
?object: :"organization.usage.web_searches.result",
|
|
928
983
|
?api_key_id: String?,
|
|
984
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?,
|
|
929
985
|
?context_level: String?,
|
|
930
986
|
?model: String?,
|
|
931
987
|
?project_id: String?,
|
|
932
988
|
?user_id: String?
|
|
933
989
|
}
|
|
990
|
+
|
|
991
|
+
type api_source = :agents_api | :unlabeled
|
|
992
|
+
|
|
993
|
+
module APISource
|
|
994
|
+
extend OpenAI::Internal::Type::Enum
|
|
995
|
+
|
|
996
|
+
AGENTS_API: :agents_api
|
|
997
|
+
UNLABELED: :unlabeled
|
|
998
|
+
|
|
999
|
+
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source]
|
|
1000
|
+
end
|
|
934
1001
|
end
|
|
935
1002
|
|
|
936
1003
|
type organization_costs_result =
|
|
@@ -938,10 +1005,12 @@ module OpenAI
|
|
|
938
1005
|
?object: :"organization.costs.result",
|
|
939
1006
|
?amount: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
940
1007
|
?api_key_id: String?,
|
|
1008
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::api_source?,
|
|
941
1009
|
?line_item: String?,
|
|
942
1010
|
?project_id: String?,
|
|
943
1011
|
?quantity: Float?,
|
|
944
|
-
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit
|
|
1012
|
+
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?,
|
|
1013
|
+
?user_id: String?
|
|
945
1014
|
}
|
|
946
1015
|
|
|
947
1016
|
class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -959,6 +1028,12 @@ module OpenAI
|
|
|
959
1028
|
# costs result.
|
|
960
1029
|
attr_accessor api_key_id: String?
|
|
961
1030
|
|
|
1031
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1032
|
+
# activity and `unlabeled` includes all records without published source
|
|
1033
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1034
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1035
|
+
attr_accessor api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::api_source?
|
|
1036
|
+
|
|
962
1037
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
963
1038
|
# costs result.
|
|
964
1039
|
attr_accessor line_item: String?
|
|
@@ -975,11 +1050,20 @@ module OpenAI
|
|
|
975
1050
|
# result, this field is `null`.
|
|
976
1051
|
attr_accessor quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?
|
|
977
1052
|
|
|
1053
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1054
|
+
# result.
|
|
1055
|
+
attr_accessor user_id: String?
|
|
1056
|
+
|
|
978
1057
|
# @param amount
|
|
979
1058
|
# The monetary value in its associated currency.
|
|
980
1059
|
# @param api_key_id
|
|
981
1060
|
# When `group_by=api_key_id`, this field provides the API Key ID of the grouped
|
|
982
1061
|
# costs result.
|
|
1062
|
+
# @param api_source
|
|
1063
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1064
|
+
# activity and `unlabeled` includes all records without published source
|
|
1065
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1066
|
+
# direct API usage. Without source grouping, this field is null.
|
|
983
1067
|
# @param line_item
|
|
984
1068
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
985
1069
|
# costs result.
|
|
@@ -992,13 +1076,18 @@ module OpenAI
|
|
|
992
1076
|
# @param quantity_unit
|
|
993
1077
|
# The unit of the `quantity` value. If no single supported unit applies to the
|
|
994
1078
|
# result, this field is `null`.
|
|
1079
|
+
# @param user_id
|
|
1080
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1081
|
+
# result.
|
|
995
1082
|
def initialize: (
|
|
996
1083
|
?amount: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
997
1084
|
?api_key_id: String?,
|
|
1085
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::api_source?,
|
|
998
1086
|
?line_item: String?,
|
|
999
1087
|
?project_id: String?,
|
|
1000
1088
|
?quantity: Float?,
|
|
1001
1089
|
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?,
|
|
1090
|
+
?user_id: String?,
|
|
1002
1091
|
?object: :"organization.costs.result"
|
|
1003
1092
|
) -> void
|
|
1004
1093
|
|
|
@@ -1006,10 +1095,12 @@ module OpenAI
|
|
|
1006
1095
|
?object: :"organization.costs.result",
|
|
1007
1096
|
?amount: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
1008
1097
|
?api_key_id: String?,
|
|
1098
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::api_source?,
|
|
1009
1099
|
?line_item: String?,
|
|
1010
1100
|
?project_id: String?,
|
|
1011
1101
|
?quantity: Float?,
|
|
1012
|
-
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit
|
|
1102
|
+
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?,
|
|
1103
|
+
?user_id: String?
|
|
1013
1104
|
}
|
|
1014
1105
|
|
|
1015
1106
|
type amount = { ?currency: String, ?value: Float }
|
|
@@ -1035,6 +1126,17 @@ module OpenAI
|
|
|
1035
1126
|
|
|
1036
1127
|
def to_hash: -> { ?currency: String, ?value: Float }
|
|
1037
1128
|
end
|
|
1129
|
+
|
|
1130
|
+
type api_source = :agents_api | :unlabeled
|
|
1131
|
+
|
|
1132
|
+
module APISource
|
|
1133
|
+
extend OpenAI::Internal::Type::Enum
|
|
1134
|
+
|
|
1135
|
+
AGENTS_API: :agents_api
|
|
1136
|
+
UNLABELED: :unlabeled
|
|
1137
|
+
|
|
1138
|
+
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::Result::OrganizationCostsResult::api_source]
|
|
1139
|
+
end
|
|
1038
1140
|
end
|
|
1039
1141
|
|
|
1040
1142
|
def self?.variants: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioSpeechesResponse::Data::result]
|
|
@@ -87,8 +87,10 @@ module OpenAI
|
|
|
87
87
|
?object: :"organization.usage.completions.result",
|
|
88
88
|
output_tokens: Integer,
|
|
89
89
|
?api_key_id: String?,
|
|
90
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?,
|
|
90
91
|
?batch: bool?,
|
|
91
92
|
?input_audio_tokens: Integer,
|
|
93
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
94
|
?input_cache_write_tokens: Integer,
|
|
93
95
|
?input_cached_audio_tokens: Integer,
|
|
94
96
|
?input_cached_image_tokens: Integer,
|
|
@@ -126,6 +128,12 @@ module OpenAI
|
|
|
126
128
|
# usage result.
|
|
127
129
|
attr_accessor api_key_id: String?
|
|
128
130
|
|
|
131
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
132
|
+
# activity and `unlabeled` includes all records without published source
|
|
133
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
134
|
+
# direct API usage. Without source grouping, this field is null.
|
|
135
|
+
attr_accessor api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?
|
|
136
|
+
|
|
129
137
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
130
138
|
# batch or not.
|
|
131
139
|
attr_accessor batch: bool?
|
|
@@ -136,10 +144,20 @@ module OpenAI
|
|
|
136
144
|
# The aggregated number of uncached audio input tokens used.
|
|
137
145
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
146
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
147
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
148
|
+
# retention period.
|
|
149
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
150
|
+
|
|
151
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
152
|
+
# retention period.
|
|
153
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
154
|
+
|
|
155
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
156
|
+
# retention period.
|
|
140
157
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
158
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
159
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
160
|
+
# retention period.
|
|
143
161
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
162
|
|
|
145
163
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -237,13 +255,22 @@ module OpenAI
|
|
|
237
255
|
# @param api_key_id
|
|
238
256
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
239
257
|
# usage result.
|
|
258
|
+
# @param api_source
|
|
259
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
260
|
+
# activity and `unlabeled` includes all records without published source
|
|
261
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
262
|
+
# direct API usage. Without source grouping, this field is null.
|
|
240
263
|
# @param batch
|
|
241
264
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
242
265
|
# batch or not.
|
|
243
266
|
# @param input_audio_tokens
|
|
244
267
|
# The aggregated number of uncached audio input tokens used.
|
|
268
|
+
# @param input_cache_write_12h_tokens
|
|
269
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
270
|
+
# retention period.
|
|
245
271
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
272
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
273
|
+
# retention period.
|
|
247
274
|
# @param input_cached_audio_tokens
|
|
248
275
|
# The aggregated number of cached audio input tokens used.
|
|
249
276
|
# @param input_cached_image_tokens
|
|
@@ -284,8 +311,10 @@ module OpenAI
|
|
|
284
311
|
num_model_requests: Integer,
|
|
285
312
|
output_tokens: Integer,
|
|
286
313
|
?api_key_id: String?,
|
|
314
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?,
|
|
287
315
|
?batch: bool?,
|
|
288
316
|
?input_audio_tokens: Integer,
|
|
317
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
318
|
?input_cache_write_tokens: Integer,
|
|
290
319
|
?input_cached_audio_tokens: Integer,
|
|
291
320
|
?input_cached_image_tokens: Integer,
|
|
@@ -310,8 +339,10 @@ module OpenAI
|
|
|
310
339
|
?object: :"organization.usage.completions.result",
|
|
311
340
|
output_tokens: Integer,
|
|
312
341
|
?api_key_id: String?,
|
|
342
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::api_source?,
|
|
313
343
|
?batch: bool?,
|
|
314
344
|
?input_audio_tokens: Integer,
|
|
345
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
346
|
?input_cache_write_tokens: Integer,
|
|
316
347
|
?input_cached_audio_tokens: Integer,
|
|
317
348
|
?input_cached_image_tokens: Integer,
|
|
@@ -328,6 +359,17 @@ module OpenAI
|
|
|
328
359
|
?service_tier: String?,
|
|
329
360
|
?user_id: String?
|
|
330
361
|
}
|
|
362
|
+
|
|
363
|
+
type api_source = :agents_api | :unlabeled
|
|
364
|
+
|
|
365
|
+
module APISource
|
|
366
|
+
extend OpenAI::Internal::Type::Enum
|
|
367
|
+
|
|
368
|
+
AGENTS_API: :agents_api
|
|
369
|
+
UNLABELED: :unlabeled
|
|
370
|
+
|
|
371
|
+
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::api_source]
|
|
372
|
+
end
|
|
331
373
|
end
|
|
332
374
|
|
|
333
375
|
type organization_usage_embeddings_result =
|
|
@@ -856,6 +898,7 @@ module OpenAI
|
|
|
856
898
|
num_requests: Integer,
|
|
857
899
|
?object: :"organization.usage.web_searches.result",
|
|
858
900
|
?api_key_id: String?,
|
|
901
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?,
|
|
859
902
|
?context_level: String?,
|
|
860
903
|
?model: String?,
|
|
861
904
|
?project_id: String?,
|
|
@@ -875,6 +918,12 @@ module OpenAI
|
|
|
875
918
|
# usage result.
|
|
876
919
|
attr_accessor api_key_id: String?
|
|
877
920
|
|
|
921
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
922
|
+
# activity and `unlabeled` includes all records without published source
|
|
923
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
924
|
+
# direct API usage. Without source grouping, this field is null.
|
|
925
|
+
attr_accessor api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?
|
|
926
|
+
|
|
878
927
|
# When `group_by=context_level`, this field provides the search context size of
|
|
879
928
|
# the grouped usage result.
|
|
880
929
|
attr_accessor context_level: String?
|
|
@@ -898,6 +947,11 @@ module OpenAI
|
|
|
898
947
|
# @param api_key_id
|
|
899
948
|
# When `group_by=api_key_id`, this field provides the API key ID of the grouped
|
|
900
949
|
# usage result.
|
|
950
|
+
# @param api_source
|
|
951
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
952
|
+
# activity and `unlabeled` includes all records without published source
|
|
953
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
954
|
+
# direct API usage. Without source grouping, this field is null.
|
|
901
955
|
# @param context_level
|
|
902
956
|
# When `group_by=context_level`, this field provides the search context size of
|
|
903
957
|
# the grouped usage result.
|
|
@@ -914,6 +968,7 @@ module OpenAI
|
|
|
914
968
|
num_model_requests: Integer,
|
|
915
969
|
num_requests: Integer,
|
|
916
970
|
?api_key_id: String?,
|
|
971
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?,
|
|
917
972
|
?context_level: String?,
|
|
918
973
|
?model: String?,
|
|
919
974
|
?project_id: String?,
|
|
@@ -926,11 +981,23 @@ module OpenAI
|
|
|
926
981
|
num_requests: Integer,
|
|
927
982
|
?object: :"organization.usage.web_searches.result",
|
|
928
983
|
?api_key_id: String?,
|
|
984
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source?,
|
|
929
985
|
?context_level: String?,
|
|
930
986
|
?model: String?,
|
|
931
987
|
?project_id: String?,
|
|
932
988
|
?user_id: String?
|
|
933
989
|
}
|
|
990
|
+
|
|
991
|
+
type api_source = :agents_api | :unlabeled
|
|
992
|
+
|
|
993
|
+
module APISource
|
|
994
|
+
extend OpenAI::Internal::Type::Enum
|
|
995
|
+
|
|
996
|
+
AGENTS_API: :agents_api
|
|
997
|
+
UNLABELED: :unlabeled
|
|
998
|
+
|
|
999
|
+
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::api_source]
|
|
1000
|
+
end
|
|
934
1001
|
end
|
|
935
1002
|
|
|
936
1003
|
type organization_costs_result =
|
|
@@ -938,10 +1005,12 @@ module OpenAI
|
|
|
938
1005
|
?object: :"organization.costs.result",
|
|
939
1006
|
?amount: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
940
1007
|
?api_key_id: String?,
|
|
1008
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::api_source?,
|
|
941
1009
|
?line_item: String?,
|
|
942
1010
|
?project_id: String?,
|
|
943
1011
|
?quantity: Float?,
|
|
944
|
-
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit
|
|
1012
|
+
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?,
|
|
1013
|
+
?user_id: String?
|
|
945
1014
|
}
|
|
946
1015
|
|
|
947
1016
|
class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -959,6 +1028,12 @@ module OpenAI
|
|
|
959
1028
|
# costs result.
|
|
960
1029
|
attr_accessor api_key_id: String?
|
|
961
1030
|
|
|
1031
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1032
|
+
# activity and `unlabeled` includes all records without published source
|
|
1033
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1034
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1035
|
+
attr_accessor api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::api_source?
|
|
1036
|
+
|
|
962
1037
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
963
1038
|
# costs result.
|
|
964
1039
|
attr_accessor line_item: String?
|
|
@@ -975,11 +1050,20 @@ module OpenAI
|
|
|
975
1050
|
# result, this field is `null`.
|
|
976
1051
|
attr_accessor quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?
|
|
977
1052
|
|
|
1053
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1054
|
+
# result.
|
|
1055
|
+
attr_accessor user_id: String?
|
|
1056
|
+
|
|
978
1057
|
# @param amount
|
|
979
1058
|
# The monetary value in its associated currency.
|
|
980
1059
|
# @param api_key_id
|
|
981
1060
|
# When `group_by=api_key_id`, this field provides the API Key ID of the grouped
|
|
982
1061
|
# costs result.
|
|
1062
|
+
# @param api_source
|
|
1063
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1064
|
+
# activity and `unlabeled` includes all records without published source
|
|
1065
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1066
|
+
# direct API usage. Without source grouping, this field is null.
|
|
983
1067
|
# @param line_item
|
|
984
1068
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
985
1069
|
# costs result.
|
|
@@ -992,13 +1076,18 @@ module OpenAI
|
|
|
992
1076
|
# @param quantity_unit
|
|
993
1077
|
# The unit of the `quantity` value. If no single supported unit applies to the
|
|
994
1078
|
# result, this field is `null`.
|
|
1079
|
+
# @param user_id
|
|
1080
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1081
|
+
# result.
|
|
995
1082
|
def initialize: (
|
|
996
1083
|
?amount: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
997
1084
|
?api_key_id: String?,
|
|
1085
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::api_source?,
|
|
998
1086
|
?line_item: String?,
|
|
999
1087
|
?project_id: String?,
|
|
1000
1088
|
?quantity: Float?,
|
|
1001
1089
|
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?,
|
|
1090
|
+
?user_id: String?,
|
|
1002
1091
|
?object: :"organization.costs.result"
|
|
1003
1092
|
) -> void
|
|
1004
1093
|
|
|
@@ -1006,10 +1095,12 @@ module OpenAI
|
|
|
1006
1095
|
?object: :"organization.costs.result",
|
|
1007
1096
|
?amount: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
1008
1097
|
?api_key_id: String?,
|
|
1098
|
+
?api_source: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::api_source?,
|
|
1009
1099
|
?line_item: String?,
|
|
1010
1100
|
?project_id: String?,
|
|
1011
1101
|
?quantity: Float?,
|
|
1012
|
-
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit
|
|
1102
|
+
?quantity_unit: OpenAI::Models::Admin::Organization::cost_quantity_unit?,
|
|
1103
|
+
?user_id: String?
|
|
1013
1104
|
}
|
|
1014
1105
|
|
|
1015
1106
|
type amount = { ?currency: String, ?value: Float }
|
|
@@ -1035,6 +1126,17 @@ module OpenAI
|
|
|
1035
1126
|
|
|
1036
1127
|
def to_hash: -> { ?currency: String, ?value: Float }
|
|
1037
1128
|
end
|
|
1129
|
+
|
|
1130
|
+
type api_source = :agents_api | :unlabeled
|
|
1131
|
+
|
|
1132
|
+
module APISource
|
|
1133
|
+
extend OpenAI::Internal::Type::Enum
|
|
1134
|
+
|
|
1135
|
+
AGENTS_API: :agents_api
|
|
1136
|
+
UNLABELED: :unlabeled
|
|
1137
|
+
|
|
1138
|
+
def self?.values: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::api_source]
|
|
1139
|
+
end
|
|
1038
1140
|
end
|
|
1039
1141
|
|
|
1040
1142
|
def self?.variants: -> ::Array[OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::result]
|