openai 0.99.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 +19 -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 +125 -3
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_completions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
- data/lib/openai/models/admin/organization/usage_costs_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_images_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +125 -3
- 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 +125 -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/sessions/turns/item_list_params.rb +79 -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_server_event.rb +12 -1
- data/lib/openai/models/beta/beta_tool.rb +12 -9
- data/lib/openai/models/beta/environment_param.rb +6 -6
- data/lib/openai/models/beta/session_turn_error.rb +9 -0
- data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
- 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_edit_params.rb +12 -9
- data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
- data/lib/openai/models/realtime/session_update_event.rb +16 -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 +12 -9
- data/lib/openai/models/video_create_error.rb +12 -1
- data/lib/openai/providers/bedrock.rb +20 -1
- data/lib/openai/resources/admin/organization/usage.rb +15 -6
- 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 +8 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +2 -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 +194 -1
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +194 -1
- 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 +194 -1
- 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/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 +12 -9
- 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_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_edit_params.rbi +12 -9
- 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 +12 -9
- data/rbi/openai/models/video_create_error.rbi +12 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +15 -6
- 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 +8 -6
- 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 +87 -2
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_images_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +87 -2
- 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 +87 -2
- 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/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 +8 -6
- 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_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_edit_params.rbs +8 -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 +8 -6
- data/sig/openai/models/video_create_error.rbs +10 -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
- metadata +11 -1
|
@@ -196,6 +196,19 @@ module OpenAI
|
|
|
196
196
|
sig { returns(T.nilable(String)) }
|
|
197
197
|
attr_accessor :api_key_id
|
|
198
198
|
|
|
199
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
200
|
+
# activity and `unlabeled` includes all records without published source
|
|
201
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
202
|
+
# direct API usage. Without source grouping, this field is null.
|
|
203
|
+
sig {
|
|
204
|
+
returns(
|
|
205
|
+
T.nilable(
|
|
206
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
207
|
+
)
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
attr_accessor :api_source
|
|
211
|
+
|
|
199
212
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
200
213
|
# batch or not.
|
|
201
214
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -329,6 +342,10 @@ module OpenAI
|
|
|
329
342
|
|
|
330
343
|
api_key_id: T.nilable(String),
|
|
331
344
|
|
|
345
|
+
api_source: T.nilable(
|
|
346
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::OrSymbol
|
|
347
|
+
),
|
|
348
|
+
|
|
332
349
|
batch: T.nilable(T::Boolean),
|
|
333
350
|
|
|
334
351
|
input_audio_tokens: Integer,
|
|
@@ -388,6 +405,12 @@ module OpenAI
|
|
|
388
405
|
# usage result.
|
|
389
406
|
api_key_id: nil,
|
|
390
407
|
|
|
408
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
409
|
+
# activity and `unlabeled` includes all records without published source
|
|
410
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
411
|
+
# direct API usage. Without source grouping, this field is null.
|
|
412
|
+
api_source: nil,
|
|
413
|
+
|
|
391
414
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
392
415
|
# batch or not.
|
|
393
416
|
batch: nil,
|
|
@@ -464,6 +487,9 @@ module OpenAI
|
|
|
464
487
|
object: Symbol,
|
|
465
488
|
output_tokens: Integer,
|
|
466
489
|
api_key_id: T.nilable(String),
|
|
490
|
+
api_source: T.nilable(
|
|
491
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
492
|
+
),
|
|
467
493
|
batch: T.nilable(T::Boolean),
|
|
468
494
|
input_audio_tokens: Integer,
|
|
469
495
|
input_cache_write_12h_tokens: Integer,
|
|
@@ -488,6 +514,40 @@ module OpenAI
|
|
|
488
514
|
def to_hash
|
|
489
515
|
end
|
|
490
516
|
|
|
517
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
518
|
+
# activity and `unlabeled` includes all records without published source
|
|
519
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
520
|
+
# direct API usage. Without source grouping, this field is null.
|
|
521
|
+
module APISource
|
|
522
|
+
extend OpenAI::Internal::Type::Enum
|
|
523
|
+
|
|
524
|
+
TaggedSymbol = T.type_alias {
|
|
525
|
+
T.all(
|
|
526
|
+
Symbol,
|
|
527
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
|
|
528
|
+
)
|
|
529
|
+
}
|
|
530
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
531
|
+
|
|
532
|
+
AGENTS_API = T.let(
|
|
533
|
+
:agents_api,
|
|
534
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
535
|
+
)
|
|
536
|
+
UNLABELED = T.let(
|
|
537
|
+
:unlabeled,
|
|
538
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
sig {
|
|
542
|
+
override.returns(
|
|
543
|
+
T::Array[
|
|
544
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
545
|
+
]
|
|
546
|
+
)
|
|
547
|
+
}
|
|
548
|
+
def self.values
|
|
549
|
+
end
|
|
550
|
+
end
|
|
491
551
|
end
|
|
492
552
|
|
|
493
553
|
class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1269,6 +1329,19 @@ module OpenAI
|
|
|
1269
1329
|
sig { returns(T.nilable(String)) }
|
|
1270
1330
|
attr_accessor :api_key_id
|
|
1271
1331
|
|
|
1332
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1333
|
+
# activity and `unlabeled` includes all records without published source
|
|
1334
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1335
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1336
|
+
sig {
|
|
1337
|
+
returns(
|
|
1338
|
+
T.nilable(
|
|
1339
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1340
|
+
)
|
|
1341
|
+
)
|
|
1342
|
+
}
|
|
1343
|
+
attr_accessor :api_source
|
|
1344
|
+
|
|
1272
1345
|
# When `group_by=context_level`, this field provides the search context size of
|
|
1273
1346
|
# the grouped usage result.
|
|
1274
1347
|
sig { returns(T.nilable(String)) }
|
|
@@ -1299,6 +1372,10 @@ module OpenAI
|
|
|
1299
1372
|
|
|
1300
1373
|
api_key_id: T.nilable(String),
|
|
1301
1374
|
|
|
1375
|
+
api_source: T.nilable(
|
|
1376
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::OrSymbol
|
|
1377
|
+
),
|
|
1378
|
+
|
|
1302
1379
|
context_level: T.nilable(String),
|
|
1303
1380
|
|
|
1304
1381
|
model: T.nilable(String),
|
|
@@ -1323,6 +1400,12 @@ module OpenAI
|
|
|
1323
1400
|
# usage result.
|
|
1324
1401
|
api_key_id: nil,
|
|
1325
1402
|
|
|
1403
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1404
|
+
# activity and `unlabeled` includes all records without published source
|
|
1405
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1406
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1407
|
+
api_source: nil,
|
|
1408
|
+
|
|
1326
1409
|
# When `group_by=context_level`, this field provides the search context size of
|
|
1327
1410
|
# the grouped usage result.
|
|
1328
1411
|
context_level: nil,
|
|
@@ -1350,6 +1433,9 @@ module OpenAI
|
|
|
1350
1433
|
num_requests: Integer,
|
|
1351
1434
|
object: Symbol,
|
|
1352
1435
|
api_key_id: T.nilable(String),
|
|
1436
|
+
api_source: T.nilable(
|
|
1437
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1438
|
+
),
|
|
1353
1439
|
context_level: T.nilable(String),
|
|
1354
1440
|
model: T.nilable(String),
|
|
1355
1441
|
project_id: T.nilable(String),
|
|
@@ -1360,6 +1446,40 @@ module OpenAI
|
|
|
1360
1446
|
def to_hash
|
|
1361
1447
|
end
|
|
1362
1448
|
|
|
1449
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1450
|
+
# activity and `unlabeled` includes all records without published source
|
|
1451
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1452
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1453
|
+
module APISource
|
|
1454
|
+
extend OpenAI::Internal::Type::Enum
|
|
1455
|
+
|
|
1456
|
+
TaggedSymbol = T.type_alias {
|
|
1457
|
+
T.all(
|
|
1458
|
+
Symbol,
|
|
1459
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
|
|
1460
|
+
)
|
|
1461
|
+
}
|
|
1462
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1463
|
+
|
|
1464
|
+
AGENTS_API = T.let(
|
|
1465
|
+
:agents_api,
|
|
1466
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1467
|
+
)
|
|
1468
|
+
UNLABELED = T.let(
|
|
1469
|
+
:unlabeled,
|
|
1470
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1471
|
+
)
|
|
1472
|
+
|
|
1473
|
+
sig {
|
|
1474
|
+
override.returns(
|
|
1475
|
+
T::Array[
|
|
1476
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1477
|
+
]
|
|
1478
|
+
)
|
|
1479
|
+
}
|
|
1480
|
+
def self.values
|
|
1481
|
+
end
|
|
1482
|
+
end
|
|
1363
1483
|
end
|
|
1364
1484
|
|
|
1365
1485
|
class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1396,6 +1516,19 @@ module OpenAI
|
|
|
1396
1516
|
sig { returns(T.nilable(String)) }
|
|
1397
1517
|
attr_accessor :api_key_id
|
|
1398
1518
|
|
|
1519
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1520
|
+
# activity and `unlabeled` includes all records without published source
|
|
1521
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1522
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1523
|
+
sig {
|
|
1524
|
+
returns(
|
|
1525
|
+
T.nilable(
|
|
1526
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1527
|
+
)
|
|
1528
|
+
)
|
|
1529
|
+
}
|
|
1530
|
+
attr_accessor :api_source
|
|
1531
|
+
|
|
1399
1532
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1400
1533
|
# costs result.
|
|
1401
1534
|
sig { returns(T.nilable(String)) }
|
|
@@ -1416,6 +1549,11 @@ module OpenAI
|
|
|
1416
1549
|
sig { returns(T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol))) }
|
|
1417
1550
|
attr_accessor :quantity_unit
|
|
1418
1551
|
|
|
1552
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1553
|
+
# result.
|
|
1554
|
+
sig { returns(T.nilable(String)) }
|
|
1555
|
+
attr_accessor :user_id
|
|
1556
|
+
|
|
1419
1557
|
# The aggregated costs details of the specific time bucket.
|
|
1420
1558
|
sig do
|
|
1421
1559
|
params(
|
|
@@ -1424,6 +1562,10 @@ module OpenAI
|
|
|
1424
1562
|
|
|
1425
1563
|
api_key_id: T.nilable(String),
|
|
1426
1564
|
|
|
1565
|
+
api_source: T.nilable(
|
|
1566
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::APISource::OrSymbol
|
|
1567
|
+
),
|
|
1568
|
+
|
|
1427
1569
|
line_item: T.nilable(String),
|
|
1428
1570
|
|
|
1429
1571
|
project_id: T.nilable(String),
|
|
@@ -1432,6 +1574,8 @@ module OpenAI
|
|
|
1432
1574
|
|
|
1433
1575
|
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol)),
|
|
1434
1576
|
|
|
1577
|
+
user_id: T.nilable(String),
|
|
1578
|
+
|
|
1435
1579
|
object: Symbol
|
|
1436
1580
|
)
|
|
1437
1581
|
.returns(T.attached_class)
|
|
@@ -1445,6 +1589,12 @@ module OpenAI
|
|
|
1445
1589
|
# costs result.
|
|
1446
1590
|
api_key_id: nil,
|
|
1447
1591
|
|
|
1592
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1593
|
+
# activity and `unlabeled` includes all records without published source
|
|
1594
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1595
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1596
|
+
api_source: nil,
|
|
1597
|
+
|
|
1448
1598
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1449
1599
|
# costs result.
|
|
1450
1600
|
line_item: nil,
|
|
@@ -1461,6 +1611,10 @@ module OpenAI
|
|
|
1461
1611
|
# result, this field is `null`.
|
|
1462
1612
|
quantity_unit: nil,
|
|
1463
1613
|
|
|
1614
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1615
|
+
# result.
|
|
1616
|
+
user_id: nil,
|
|
1617
|
+
|
|
1464
1618
|
object: :"organization.costs.result"
|
|
1465
1619
|
)
|
|
1466
1620
|
end
|
|
@@ -1471,10 +1625,14 @@ module OpenAI
|
|
|
1471
1625
|
object: Symbol,
|
|
1472
1626
|
amount: OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
1473
1627
|
api_key_id: T.nilable(String),
|
|
1628
|
+
api_source: T.nilable(
|
|
1629
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1630
|
+
),
|
|
1474
1631
|
line_item: T.nilable(String),
|
|
1475
1632
|
project_id: T.nilable(String),
|
|
1476
1633
|
quantity: T.nilable(Float),
|
|
1477
|
-
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol))
|
|
1634
|
+
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol)),
|
|
1635
|
+
user_id: T.nilable(String)
|
|
1478
1636
|
}
|
|
1479
1637
|
)
|
|
1480
1638
|
end
|
|
@@ -1533,6 +1691,41 @@ module OpenAI
|
|
|
1533
1691
|
end
|
|
1534
1692
|
|
|
1535
1693
|
end
|
|
1694
|
+
|
|
1695
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1696
|
+
# activity and `unlabeled` includes all records without published source
|
|
1697
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1698
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1699
|
+
module APISource
|
|
1700
|
+
extend OpenAI::Internal::Type::Enum
|
|
1701
|
+
|
|
1702
|
+
TaggedSymbol = T.type_alias {
|
|
1703
|
+
T.all(
|
|
1704
|
+
Symbol,
|
|
1705
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::APISource
|
|
1706
|
+
)
|
|
1707
|
+
}
|
|
1708
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1709
|
+
|
|
1710
|
+
AGENTS_API = T.let(
|
|
1711
|
+
:agents_api,
|
|
1712
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1713
|
+
)
|
|
1714
|
+
UNLABELED = T.let(
|
|
1715
|
+
:unlabeled,
|
|
1716
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1717
|
+
)
|
|
1718
|
+
|
|
1719
|
+
sig {
|
|
1720
|
+
override.returns(
|
|
1721
|
+
T::Array[
|
|
1722
|
+
OpenAI::Models::Admin::Organization::UsageAudioTranscriptionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1723
|
+
]
|
|
1724
|
+
)
|
|
1725
|
+
}
|
|
1726
|
+
def self.values
|
|
1727
|
+
end
|
|
1728
|
+
end
|
|
1536
1729
|
end
|
|
1537
1730
|
|
|
1538
1731
|
sig {
|
|
@@ -198,6 +198,19 @@ module OpenAI
|
|
|
198
198
|
sig { returns(T.nilable(String)) }
|
|
199
199
|
attr_accessor :api_key_id
|
|
200
200
|
|
|
201
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
202
|
+
# activity and `unlabeled` includes all records without published source
|
|
203
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
204
|
+
# direct API usage. Without source grouping, this field is null.
|
|
205
|
+
sig {
|
|
206
|
+
returns(
|
|
207
|
+
T.nilable(
|
|
208
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
209
|
+
)
|
|
210
|
+
)
|
|
211
|
+
}
|
|
212
|
+
attr_accessor :api_source
|
|
213
|
+
|
|
201
214
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
202
215
|
# batch or not.
|
|
203
216
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -331,6 +344,10 @@ module OpenAI
|
|
|
331
344
|
|
|
332
345
|
api_key_id: T.nilable(String),
|
|
333
346
|
|
|
347
|
+
api_source: T.nilable(
|
|
348
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::OrSymbol
|
|
349
|
+
),
|
|
350
|
+
|
|
334
351
|
batch: T.nilable(T::Boolean),
|
|
335
352
|
|
|
336
353
|
input_audio_tokens: Integer,
|
|
@@ -390,6 +407,12 @@ module OpenAI
|
|
|
390
407
|
# usage result.
|
|
391
408
|
api_key_id: nil,
|
|
392
409
|
|
|
410
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
411
|
+
# activity and `unlabeled` includes all records without published source
|
|
412
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
413
|
+
# direct API usage. Without source grouping, this field is null.
|
|
414
|
+
api_source: nil,
|
|
415
|
+
|
|
393
416
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
394
417
|
# batch or not.
|
|
395
418
|
batch: nil,
|
|
@@ -466,6 +489,9 @@ module OpenAI
|
|
|
466
489
|
object: Symbol,
|
|
467
490
|
output_tokens: Integer,
|
|
468
491
|
api_key_id: T.nilable(String),
|
|
492
|
+
api_source: T.nilable(
|
|
493
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
494
|
+
),
|
|
469
495
|
batch: T.nilable(T::Boolean),
|
|
470
496
|
input_audio_tokens: Integer,
|
|
471
497
|
input_cache_write_12h_tokens: Integer,
|
|
@@ -490,6 +516,40 @@ module OpenAI
|
|
|
490
516
|
def to_hash
|
|
491
517
|
end
|
|
492
518
|
|
|
519
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
520
|
+
# activity and `unlabeled` includes all records without published source
|
|
521
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
522
|
+
# direct API usage. Without source grouping, this field is null.
|
|
523
|
+
module APISource
|
|
524
|
+
extend OpenAI::Internal::Type::Enum
|
|
525
|
+
|
|
526
|
+
TaggedSymbol = T.type_alias {
|
|
527
|
+
T.all(
|
|
528
|
+
Symbol,
|
|
529
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
|
|
530
|
+
)
|
|
531
|
+
}
|
|
532
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
533
|
+
|
|
534
|
+
AGENTS_API = T.let(
|
|
535
|
+
:agents_api,
|
|
536
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
537
|
+
)
|
|
538
|
+
UNLABELED = T.let(
|
|
539
|
+
:unlabeled,
|
|
540
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
sig {
|
|
544
|
+
override.returns(
|
|
545
|
+
T::Array[
|
|
546
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
547
|
+
]
|
|
548
|
+
)
|
|
549
|
+
}
|
|
550
|
+
def self.values
|
|
551
|
+
end
|
|
552
|
+
end
|
|
493
553
|
end
|
|
494
554
|
|
|
495
555
|
class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1271,6 +1331,19 @@ module OpenAI
|
|
|
1271
1331
|
sig { returns(T.nilable(String)) }
|
|
1272
1332
|
attr_accessor :api_key_id
|
|
1273
1333
|
|
|
1334
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1335
|
+
# activity and `unlabeled` includes all records without published source
|
|
1336
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1337
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1338
|
+
sig {
|
|
1339
|
+
returns(
|
|
1340
|
+
T.nilable(
|
|
1341
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1342
|
+
)
|
|
1343
|
+
)
|
|
1344
|
+
}
|
|
1345
|
+
attr_accessor :api_source
|
|
1346
|
+
|
|
1274
1347
|
# When `group_by=context_level`, this field provides the search context size of
|
|
1275
1348
|
# the grouped usage result.
|
|
1276
1349
|
sig { returns(T.nilable(String)) }
|
|
@@ -1301,6 +1374,10 @@ module OpenAI
|
|
|
1301
1374
|
|
|
1302
1375
|
api_key_id: T.nilable(String),
|
|
1303
1376
|
|
|
1377
|
+
api_source: T.nilable(
|
|
1378
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::OrSymbol
|
|
1379
|
+
),
|
|
1380
|
+
|
|
1304
1381
|
context_level: T.nilable(String),
|
|
1305
1382
|
|
|
1306
1383
|
model: T.nilable(String),
|
|
@@ -1325,6 +1402,12 @@ module OpenAI
|
|
|
1325
1402
|
# usage result.
|
|
1326
1403
|
api_key_id: nil,
|
|
1327
1404
|
|
|
1405
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1406
|
+
# activity and `unlabeled` includes all records without published source
|
|
1407
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1408
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1409
|
+
api_source: nil,
|
|
1410
|
+
|
|
1328
1411
|
# When `group_by=context_level`, this field provides the search context size of
|
|
1329
1412
|
# the grouped usage result.
|
|
1330
1413
|
context_level: nil,
|
|
@@ -1352,6 +1435,9 @@ module OpenAI
|
|
|
1352
1435
|
num_requests: Integer,
|
|
1353
1436
|
object: Symbol,
|
|
1354
1437
|
api_key_id: T.nilable(String),
|
|
1438
|
+
api_source: T.nilable(
|
|
1439
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1440
|
+
),
|
|
1355
1441
|
context_level: T.nilable(String),
|
|
1356
1442
|
model: T.nilable(String),
|
|
1357
1443
|
project_id: T.nilable(String),
|
|
@@ -1362,6 +1448,40 @@ module OpenAI
|
|
|
1362
1448
|
def to_hash
|
|
1363
1449
|
end
|
|
1364
1450
|
|
|
1451
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1452
|
+
# activity and `unlabeled` includes all records without published source
|
|
1453
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1454
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1455
|
+
module APISource
|
|
1456
|
+
extend OpenAI::Internal::Type::Enum
|
|
1457
|
+
|
|
1458
|
+
TaggedSymbol = T.type_alias {
|
|
1459
|
+
T.all(
|
|
1460
|
+
Symbol,
|
|
1461
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
|
|
1462
|
+
)
|
|
1463
|
+
}
|
|
1464
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1465
|
+
|
|
1466
|
+
AGENTS_API = T.let(
|
|
1467
|
+
:agents_api,
|
|
1468
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1469
|
+
)
|
|
1470
|
+
UNLABELED = T.let(
|
|
1471
|
+
:unlabeled,
|
|
1472
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1473
|
+
)
|
|
1474
|
+
|
|
1475
|
+
sig {
|
|
1476
|
+
override.returns(
|
|
1477
|
+
T::Array[
|
|
1478
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1479
|
+
]
|
|
1480
|
+
)
|
|
1481
|
+
}
|
|
1482
|
+
def self.values
|
|
1483
|
+
end
|
|
1484
|
+
end
|
|
1365
1485
|
end
|
|
1366
1486
|
|
|
1367
1487
|
class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1398,6 +1518,19 @@ module OpenAI
|
|
|
1398
1518
|
sig { returns(T.nilable(String)) }
|
|
1399
1519
|
attr_accessor :api_key_id
|
|
1400
1520
|
|
|
1521
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1522
|
+
# activity and `unlabeled` includes all records without published source
|
|
1523
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1524
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1525
|
+
sig {
|
|
1526
|
+
returns(
|
|
1527
|
+
T.nilable(
|
|
1528
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1529
|
+
)
|
|
1530
|
+
)
|
|
1531
|
+
}
|
|
1532
|
+
attr_accessor :api_source
|
|
1533
|
+
|
|
1401
1534
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1402
1535
|
# costs result.
|
|
1403
1536
|
sig { returns(T.nilable(String)) }
|
|
@@ -1418,6 +1551,11 @@ module OpenAI
|
|
|
1418
1551
|
sig { returns(T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol))) }
|
|
1419
1552
|
attr_accessor :quantity_unit
|
|
1420
1553
|
|
|
1554
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1555
|
+
# result.
|
|
1556
|
+
sig { returns(T.nilable(String)) }
|
|
1557
|
+
attr_accessor :user_id
|
|
1558
|
+
|
|
1421
1559
|
# The aggregated costs details of the specific time bucket.
|
|
1422
1560
|
sig do
|
|
1423
1561
|
params(
|
|
@@ -1426,6 +1564,10 @@ module OpenAI
|
|
|
1426
1564
|
|
|
1427
1565
|
api_key_id: T.nilable(String),
|
|
1428
1566
|
|
|
1567
|
+
api_source: T.nilable(
|
|
1568
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::APISource::OrSymbol
|
|
1569
|
+
),
|
|
1570
|
+
|
|
1429
1571
|
line_item: T.nilable(String),
|
|
1430
1572
|
|
|
1431
1573
|
project_id: T.nilable(String),
|
|
@@ -1434,6 +1576,8 @@ module OpenAI
|
|
|
1434
1576
|
|
|
1435
1577
|
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol)),
|
|
1436
1578
|
|
|
1579
|
+
user_id: T.nilable(String),
|
|
1580
|
+
|
|
1437
1581
|
object: Symbol
|
|
1438
1582
|
)
|
|
1439
1583
|
.returns(T.attached_class)
|
|
@@ -1447,6 +1591,12 @@ module OpenAI
|
|
|
1447
1591
|
# costs result.
|
|
1448
1592
|
api_key_id: nil,
|
|
1449
1593
|
|
|
1594
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1595
|
+
# activity and `unlabeled` includes all records without published source
|
|
1596
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1597
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1598
|
+
api_source: nil,
|
|
1599
|
+
|
|
1450
1600
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1451
1601
|
# costs result.
|
|
1452
1602
|
line_item: nil,
|
|
@@ -1463,6 +1613,10 @@ module OpenAI
|
|
|
1463
1613
|
# result, this field is `null`.
|
|
1464
1614
|
quantity_unit: nil,
|
|
1465
1615
|
|
|
1616
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1617
|
+
# result.
|
|
1618
|
+
user_id: nil,
|
|
1619
|
+
|
|
1466
1620
|
object: :"organization.costs.result"
|
|
1467
1621
|
)
|
|
1468
1622
|
end
|
|
@@ -1473,10 +1627,14 @@ module OpenAI
|
|
|
1473
1627
|
object: Symbol,
|
|
1474
1628
|
amount: OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
1475
1629
|
api_key_id: T.nilable(String),
|
|
1630
|
+
api_source: T.nilable(
|
|
1631
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1632
|
+
),
|
|
1476
1633
|
line_item: T.nilable(String),
|
|
1477
1634
|
project_id: T.nilable(String),
|
|
1478
1635
|
quantity: T.nilable(Float),
|
|
1479
|
-
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol))
|
|
1636
|
+
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol)),
|
|
1637
|
+
user_id: T.nilable(String)
|
|
1480
1638
|
}
|
|
1481
1639
|
)
|
|
1482
1640
|
end
|
|
@@ -1535,6 +1693,41 @@ module OpenAI
|
|
|
1535
1693
|
end
|
|
1536
1694
|
|
|
1537
1695
|
end
|
|
1696
|
+
|
|
1697
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1698
|
+
# activity and `unlabeled` includes all records without published source
|
|
1699
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1700
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1701
|
+
module APISource
|
|
1702
|
+
extend OpenAI::Internal::Type::Enum
|
|
1703
|
+
|
|
1704
|
+
TaggedSymbol = T.type_alias {
|
|
1705
|
+
T.all(
|
|
1706
|
+
Symbol,
|
|
1707
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::APISource
|
|
1708
|
+
)
|
|
1709
|
+
}
|
|
1710
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1711
|
+
|
|
1712
|
+
AGENTS_API = T.let(
|
|
1713
|
+
:agents_api,
|
|
1714
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1715
|
+
)
|
|
1716
|
+
UNLABELED = T.let(
|
|
1717
|
+
:unlabeled,
|
|
1718
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1719
|
+
)
|
|
1720
|
+
|
|
1721
|
+
sig {
|
|
1722
|
+
override.returns(
|
|
1723
|
+
T::Array[
|
|
1724
|
+
OpenAI::Models::Admin::Organization::UsageCodeInterpreterSessionsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1725
|
+
]
|
|
1726
|
+
)
|
|
1727
|
+
}
|
|
1728
|
+
def self.values
|
|
1729
|
+
end
|
|
1730
|
+
end
|
|
1538
1731
|
end
|
|
1539
1732
|
|
|
1540
1733
|
sig {
|
|
@@ -54,8 +54,10 @@ module OpenAI
|
|
|
54
54
|
attr_writer :end_time
|
|
55
55
|
|
|
56
56
|
# Group the usage data by the specified fields. Support fields include
|
|
57
|
-
# `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier
|
|
58
|
-
# combination of them.
|
|
57
|
+
# `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier`,
|
|
58
|
+
# `api_source` or any combination of them. When grouped by `api_source`, results
|
|
59
|
+
# use `agents_api` for attributed Agents API activity and `unlabeled` for all
|
|
60
|
+
# other activity. Without source grouping, `api_source` is null.
|
|
59
61
|
sig { returns(T.nilable(T::Array[OpenAI::Admin::Organization::UsageCompletionsParams::GroupBy::OrSymbol])) }
|
|
60
62
|
attr_reader :group_by
|
|
61
63
|
|
|
@@ -153,8 +155,10 @@ module OpenAI
|
|
|
153
155
|
end_time: nil,
|
|
154
156
|
|
|
155
157
|
# Group the usage data by the specified fields. Support fields include
|
|
156
|
-
# `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier
|
|
157
|
-
# combination of them.
|
|
158
|
+
# `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier`,
|
|
159
|
+
# `api_source` or any combination of them. When grouped by `api_source`, results
|
|
160
|
+
# use `agents_api` for attributed Agents API activity and `unlabeled` for all
|
|
161
|
+
# other activity. Without source grouping, `api_source` is null.
|
|
158
162
|
group_by: nil,
|
|
159
163
|
|
|
160
164
|
# Specifies the number of buckets to return.
|
|
@@ -247,6 +251,7 @@ module OpenAI
|
|
|
247
251
|
:service_tier,
|
|
248
252
|
OpenAI::Admin::Organization::UsageCompletionsParams::GroupBy::TaggedSymbol
|
|
249
253
|
)
|
|
254
|
+
API_SOURCE = T.let(:api_source, OpenAI::Admin::Organization::UsageCompletionsParams::GroupBy::TaggedSymbol)
|
|
250
255
|
|
|
251
256
|
sig {
|
|
252
257
|
override.returns(T::Array[OpenAI::Admin::Organization::UsageCompletionsParams::GroupBy::TaggedSymbol])
|