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
|
@@ -194,6 +194,19 @@ module OpenAI
|
|
|
194
194
|
sig { returns(T.nilable(String)) }
|
|
195
195
|
attr_accessor :api_key_id
|
|
196
196
|
|
|
197
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
198
|
+
# activity and `unlabeled` includes all records without published source
|
|
199
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
200
|
+
# direct API usage. Without source grouping, this field is null.
|
|
201
|
+
sig {
|
|
202
|
+
returns(
|
|
203
|
+
T.nilable(
|
|
204
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
205
|
+
)
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
attr_accessor :api_source
|
|
209
|
+
|
|
197
210
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
198
211
|
# batch or not.
|
|
199
212
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -327,6 +340,10 @@ module OpenAI
|
|
|
327
340
|
|
|
328
341
|
api_key_id: T.nilable(String),
|
|
329
342
|
|
|
343
|
+
api_source: T.nilable(
|
|
344
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::OrSymbol
|
|
345
|
+
),
|
|
346
|
+
|
|
330
347
|
batch: T.nilable(T::Boolean),
|
|
331
348
|
|
|
332
349
|
input_audio_tokens: Integer,
|
|
@@ -386,6 +403,12 @@ module OpenAI
|
|
|
386
403
|
# usage result.
|
|
387
404
|
api_key_id: nil,
|
|
388
405
|
|
|
406
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
407
|
+
# activity and `unlabeled` includes all records without published source
|
|
408
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
409
|
+
# direct API usage. Without source grouping, this field is null.
|
|
410
|
+
api_source: nil,
|
|
411
|
+
|
|
389
412
|
# When `group_by=batch`, this field tells whether the grouped usage result is
|
|
390
413
|
# batch or not.
|
|
391
414
|
batch: nil,
|
|
@@ -462,6 +485,9 @@ module OpenAI
|
|
|
462
485
|
object: Symbol,
|
|
463
486
|
output_tokens: Integer,
|
|
464
487
|
api_key_id: T.nilable(String),
|
|
488
|
+
api_source: T.nilable(
|
|
489
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
490
|
+
),
|
|
465
491
|
batch: T.nilable(T::Boolean),
|
|
466
492
|
input_audio_tokens: Integer,
|
|
467
493
|
input_cache_write_12h_tokens: Integer,
|
|
@@ -486,6 +512,40 @@ module OpenAI
|
|
|
486
512
|
def to_hash
|
|
487
513
|
end
|
|
488
514
|
|
|
515
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
516
|
+
# activity and `unlabeled` includes all records without published source
|
|
517
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
518
|
+
# direct API usage. Without source grouping, this field is null.
|
|
519
|
+
module APISource
|
|
520
|
+
extend OpenAI::Internal::Type::Enum
|
|
521
|
+
|
|
522
|
+
TaggedSymbol = T.type_alias {
|
|
523
|
+
T.all(
|
|
524
|
+
Symbol,
|
|
525
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult::APISource
|
|
526
|
+
)
|
|
527
|
+
}
|
|
528
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
529
|
+
|
|
530
|
+
AGENTS_API = T.let(
|
|
531
|
+
:agents_api,
|
|
532
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
533
|
+
)
|
|
534
|
+
UNLABELED = T.let(
|
|
535
|
+
:unlabeled,
|
|
536
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
sig {
|
|
540
|
+
override.returns(
|
|
541
|
+
T::Array[
|
|
542
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
543
|
+
]
|
|
544
|
+
)
|
|
545
|
+
}
|
|
546
|
+
def self.values
|
|
547
|
+
end
|
|
548
|
+
end
|
|
489
549
|
end
|
|
490
550
|
|
|
491
551
|
class OrganizationUsageEmbeddingsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1267,6 +1327,19 @@ module OpenAI
|
|
|
1267
1327
|
sig { returns(T.nilable(String)) }
|
|
1268
1328
|
attr_accessor :api_key_id
|
|
1269
1329
|
|
|
1330
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1331
|
+
# activity and `unlabeled` includes all records without published source
|
|
1332
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1333
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1334
|
+
sig {
|
|
1335
|
+
returns(
|
|
1336
|
+
T.nilable(
|
|
1337
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1338
|
+
)
|
|
1339
|
+
)
|
|
1340
|
+
}
|
|
1341
|
+
attr_accessor :api_source
|
|
1342
|
+
|
|
1270
1343
|
# When `group_by=context_level`, this field provides the search context size of
|
|
1271
1344
|
# the grouped usage result.
|
|
1272
1345
|
sig { returns(T.nilable(String)) }
|
|
@@ -1297,6 +1370,10 @@ module OpenAI
|
|
|
1297
1370
|
|
|
1298
1371
|
api_key_id: T.nilable(String),
|
|
1299
1372
|
|
|
1373
|
+
api_source: T.nilable(
|
|
1374
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::OrSymbol
|
|
1375
|
+
),
|
|
1376
|
+
|
|
1300
1377
|
context_level: T.nilable(String),
|
|
1301
1378
|
|
|
1302
1379
|
model: T.nilable(String),
|
|
@@ -1321,6 +1398,12 @@ module OpenAI
|
|
|
1321
1398
|
# usage result.
|
|
1322
1399
|
api_key_id: nil,
|
|
1323
1400
|
|
|
1401
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1402
|
+
# activity and `unlabeled` includes all records without published source
|
|
1403
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1404
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1405
|
+
api_source: nil,
|
|
1406
|
+
|
|
1324
1407
|
# When `group_by=context_level`, this field provides the search context size of
|
|
1325
1408
|
# the grouped usage result.
|
|
1326
1409
|
context_level: nil,
|
|
@@ -1348,6 +1431,9 @@ module OpenAI
|
|
|
1348
1431
|
num_requests: Integer,
|
|
1349
1432
|
object: Symbol,
|
|
1350
1433
|
api_key_id: T.nilable(String),
|
|
1434
|
+
api_source: T.nilable(
|
|
1435
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1436
|
+
),
|
|
1351
1437
|
context_level: T.nilable(String),
|
|
1352
1438
|
model: T.nilable(String),
|
|
1353
1439
|
project_id: T.nilable(String),
|
|
@@ -1358,6 +1444,40 @@ module OpenAI
|
|
|
1358
1444
|
def to_hash
|
|
1359
1445
|
end
|
|
1360
1446
|
|
|
1447
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1448
|
+
# activity and `unlabeled` includes all records without published source
|
|
1449
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1450
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1451
|
+
module APISource
|
|
1452
|
+
extend OpenAI::Internal::Type::Enum
|
|
1453
|
+
|
|
1454
|
+
TaggedSymbol = T.type_alias {
|
|
1455
|
+
T.all(
|
|
1456
|
+
Symbol,
|
|
1457
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource
|
|
1458
|
+
)
|
|
1459
|
+
}
|
|
1460
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1461
|
+
|
|
1462
|
+
AGENTS_API = T.let(
|
|
1463
|
+
:agents_api,
|
|
1464
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1465
|
+
)
|
|
1466
|
+
UNLABELED = T.let(
|
|
1467
|
+
:unlabeled,
|
|
1468
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1469
|
+
)
|
|
1470
|
+
|
|
1471
|
+
sig {
|
|
1472
|
+
override.returns(
|
|
1473
|
+
T::Array[
|
|
1474
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1475
|
+
]
|
|
1476
|
+
)
|
|
1477
|
+
}
|
|
1478
|
+
def self.values
|
|
1479
|
+
end
|
|
1480
|
+
end
|
|
1361
1481
|
end
|
|
1362
1482
|
|
|
1363
1483
|
class OrganizationCostsResult < OpenAI::Internal::Type::BaseModel
|
|
@@ -1394,6 +1514,19 @@ module OpenAI
|
|
|
1394
1514
|
sig { returns(T.nilable(String)) }
|
|
1395
1515
|
attr_accessor :api_key_id
|
|
1396
1516
|
|
|
1517
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1518
|
+
# activity and `unlabeled` includes all records without published source
|
|
1519
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1520
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1521
|
+
sig {
|
|
1522
|
+
returns(
|
|
1523
|
+
T.nilable(
|
|
1524
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1525
|
+
)
|
|
1526
|
+
)
|
|
1527
|
+
}
|
|
1528
|
+
attr_accessor :api_source
|
|
1529
|
+
|
|
1397
1530
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1398
1531
|
# costs result.
|
|
1399
1532
|
sig { returns(T.nilable(String)) }
|
|
@@ -1414,6 +1547,11 @@ module OpenAI
|
|
|
1414
1547
|
sig { returns(T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol))) }
|
|
1415
1548
|
attr_accessor :quantity_unit
|
|
1416
1549
|
|
|
1550
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1551
|
+
# result.
|
|
1552
|
+
sig { returns(T.nilable(String)) }
|
|
1553
|
+
attr_accessor :user_id
|
|
1554
|
+
|
|
1417
1555
|
# The aggregated costs details of the specific time bucket.
|
|
1418
1556
|
sig do
|
|
1419
1557
|
params(
|
|
@@ -1422,6 +1560,10 @@ module OpenAI
|
|
|
1422
1560
|
|
|
1423
1561
|
api_key_id: T.nilable(String),
|
|
1424
1562
|
|
|
1563
|
+
api_source: T.nilable(
|
|
1564
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::APISource::OrSymbol
|
|
1565
|
+
),
|
|
1566
|
+
|
|
1425
1567
|
line_item: T.nilable(String),
|
|
1426
1568
|
|
|
1427
1569
|
project_id: T.nilable(String),
|
|
@@ -1430,6 +1572,8 @@ module OpenAI
|
|
|
1430
1572
|
|
|
1431
1573
|
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol)),
|
|
1432
1574
|
|
|
1575
|
+
user_id: T.nilable(String),
|
|
1576
|
+
|
|
1433
1577
|
object: Symbol
|
|
1434
1578
|
)
|
|
1435
1579
|
.returns(T.attached_class)
|
|
@@ -1443,6 +1587,12 @@ module OpenAI
|
|
|
1443
1587
|
# costs result.
|
|
1444
1588
|
api_key_id: nil,
|
|
1445
1589
|
|
|
1590
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1591
|
+
# activity and `unlabeled` includes all records without published source
|
|
1592
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1593
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1594
|
+
api_source: nil,
|
|
1595
|
+
|
|
1446
1596
|
# When `group_by=line_item`, this field provides the line item of the grouped
|
|
1447
1597
|
# costs result.
|
|
1448
1598
|
line_item: nil,
|
|
@@ -1459,6 +1609,10 @@ module OpenAI
|
|
|
1459
1609
|
# result, this field is `null`.
|
|
1460
1610
|
quantity_unit: nil,
|
|
1461
1611
|
|
|
1612
|
+
# When `group_by=user_id`, this field provides the user ID of the grouped costs
|
|
1613
|
+
# result.
|
|
1614
|
+
user_id: nil,
|
|
1615
|
+
|
|
1462
1616
|
object: :"organization.costs.result"
|
|
1463
1617
|
)
|
|
1464
1618
|
end
|
|
@@ -1469,10 +1623,14 @@ module OpenAI
|
|
|
1469
1623
|
object: Symbol,
|
|
1470
1624
|
amount: OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
1471
1625
|
api_key_id: T.nilable(String),
|
|
1626
|
+
api_source: T.nilable(
|
|
1627
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1628
|
+
),
|
|
1472
1629
|
line_item: T.nilable(String),
|
|
1473
1630
|
project_id: T.nilable(String),
|
|
1474
1631
|
quantity: T.nilable(Float),
|
|
1475
|
-
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol))
|
|
1632
|
+
quantity_unit: T.nilable(T.any(String, OpenAI::Admin::Organization::CostQuantityUnit::OrSymbol)),
|
|
1633
|
+
user_id: T.nilable(String)
|
|
1476
1634
|
}
|
|
1477
1635
|
)
|
|
1478
1636
|
end
|
|
@@ -1531,6 +1689,41 @@ module OpenAI
|
|
|
1531
1689
|
end
|
|
1532
1690
|
|
|
1533
1691
|
end
|
|
1692
|
+
|
|
1693
|
+
# When grouped by `api_source`, `agents_api` identifies attributed Agents API
|
|
1694
|
+
# activity and `unlabeled` includes all records without published source
|
|
1695
|
+
# attribution, including historical and unknown origins. Unlabeled does not imply
|
|
1696
|
+
# direct API usage. Without source grouping, this field is null.
|
|
1697
|
+
module APISource
|
|
1698
|
+
extend OpenAI::Internal::Type::Enum
|
|
1699
|
+
|
|
1700
|
+
TaggedSymbol = T.type_alias {
|
|
1701
|
+
T.all(
|
|
1702
|
+
Symbol,
|
|
1703
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::APISource
|
|
1704
|
+
)
|
|
1705
|
+
}
|
|
1706
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1707
|
+
|
|
1708
|
+
AGENTS_API = T.let(
|
|
1709
|
+
:agents_api,
|
|
1710
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1711
|
+
)
|
|
1712
|
+
UNLABELED = T.let(
|
|
1713
|
+
:unlabeled,
|
|
1714
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1715
|
+
)
|
|
1716
|
+
|
|
1717
|
+
sig {
|
|
1718
|
+
override.returns(
|
|
1719
|
+
T::Array[
|
|
1720
|
+
OpenAI::Models::Admin::Organization::UsageVectorStoresResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1721
|
+
]
|
|
1722
|
+
)
|
|
1723
|
+
}
|
|
1724
|
+
def self.values
|
|
1725
|
+
end
|
|
1726
|
+
end
|
|
1534
1727
|
end
|
|
1535
1728
|
|
|
1536
1729
|
sig {
|
|
@@ -62,8 +62,10 @@ module OpenAI
|
|
|
62
62
|
attr_writer :end_time
|
|
63
63
|
|
|
64
64
|
# Group the usage data by the specified fields. Support fields include
|
|
65
|
-
# `project_id`, `user_id`, `api_key_id`, `model`, `context_level` or
|
|
66
|
-
# combination of them.
|
|
65
|
+
# `project_id`, `user_id`, `api_key_id`, `model`, `context_level`, `api_source` or
|
|
66
|
+
# any combination of them. When grouped by `api_source`, results use `agents_api`
|
|
67
|
+
# for attributed Agents API activity and `unlabeled` for all other activity.
|
|
68
|
+
# Without source grouping, `api_source` is null.
|
|
67
69
|
sig {
|
|
68
70
|
returns(T.nilable(T::Array[OpenAI::Admin::Organization::UsageWebSearchCallsParams::GroupBy::OrSymbol]))
|
|
69
71
|
}
|
|
@@ -162,8 +164,10 @@ module OpenAI
|
|
|
162
164
|
end_time: nil,
|
|
163
165
|
|
|
164
166
|
# Group the usage data by the specified fields. Support fields include
|
|
165
|
-
# `project_id`, `user_id`, `api_key_id`, `model`, `context_level` or
|
|
166
|
-
# combination of them.
|
|
167
|
+
# `project_id`, `user_id`, `api_key_id`, `model`, `context_level`, `api_source` or
|
|
168
|
+
# any combination of them. When grouped by `api_source`, results use `agents_api`
|
|
169
|
+
# for attributed Agents API activity and `unlabeled` for all other activity.
|
|
170
|
+
# Without source grouping, `api_source` is null.
|
|
167
171
|
group_by: nil,
|
|
168
172
|
|
|
169
173
|
# Specifies the number of buckets to return.
|
|
@@ -286,6 +290,10 @@ module OpenAI
|
|
|
286
290
|
:context_level,
|
|
287
291
|
OpenAI::Admin::Organization::UsageWebSearchCallsParams::GroupBy::TaggedSymbol
|
|
288
292
|
)
|
|
293
|
+
API_SOURCE = T.let(
|
|
294
|
+
:api_source,
|
|
295
|
+
OpenAI::Admin::Organization::UsageWebSearchCallsParams::GroupBy::TaggedSymbol
|
|
296
|
+
)
|
|
289
297
|
|
|
290
298
|
sig {
|
|
291
299
|
override.returns(T::Array[OpenAI::Admin::Organization::UsageWebSearchCallsParams::GroupBy::TaggedSymbol])
|
|
@@ -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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
535
|
+
)
|
|
536
|
+
UNLABELED = T.let(
|
|
537
|
+
:unlabeled,
|
|
538
|
+
OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageCompletionsResult::APISource::TaggedSymbol
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
sig {
|
|
542
|
+
override.returns(
|
|
543
|
+
T::Array[
|
|
544
|
+
OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1467
|
+
)
|
|
1468
|
+
UNLABELED = T.let(
|
|
1469
|
+
:unlabeled,
|
|
1470
|
+
OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationUsageWebSearchesResult::APISource::TaggedSymbol
|
|
1471
|
+
)
|
|
1472
|
+
|
|
1473
|
+
sig {
|
|
1474
|
+
override.returns(
|
|
1475
|
+
T::Array[
|
|
1476
|
+
OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount,
|
|
1473
1627
|
api_key_id: T.nilable(String),
|
|
1628
|
+
api_source: T.nilable(
|
|
1629
|
+
OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::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::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1713
|
+
)
|
|
1714
|
+
UNLABELED = T.let(
|
|
1715
|
+
:unlabeled,
|
|
1716
|
+
OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1717
|
+
)
|
|
1718
|
+
|
|
1719
|
+
sig {
|
|
1720
|
+
override.returns(
|
|
1721
|
+
T::Array[
|
|
1722
|
+
OpenAI::Models::Admin::Organization::UsageWebSearchCallsResponse::Data::Result::OrganizationCostsResult::APISource::TaggedSymbol
|
|
1723
|
+
]
|
|
1724
|
+
)
|
|
1725
|
+
}
|
|
1726
|
+
def self.values
|
|
1727
|
+
end
|
|
1728
|
+
end
|
|
1536
1729
|
end
|
|
1537
1730
|
|
|
1538
1731
|
sig {
|