openai 0.72.0 → 0.74.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 +16 -0
- data/README.md +1 -1
- data/lib/openai/models/audio/transcription.rb +10 -1
- data/lib/openai/models/audio/transcription_create_params.rb +24 -5
- data/lib/openai/models/audio/transcription_language.rb +20 -0
- data/lib/openai/models/audio/transcription_text_done_event.rb +10 -1
- data/lib/openai/models/audio_model.rb +1 -0
- data/lib/openai/models/beta/beta_response.rb +15 -6
- data/lib/openai/models/beta/beta_responses_client_event.rb +15 -6
- data/lib/openai/models/beta/response_create_params.rb +15 -6
- data/lib/openai/models/chat/chat_completion.rb +15 -6
- data/lib/openai/models/chat/chat_completion_chunk.rb +15 -6
- data/lib/openai/models/chat/completion_create_params.rb +15 -6
- data/lib/openai/models/realtime/audio_transcription.rb +35 -8
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb +10 -1
- data/lib/openai/models/responses/response.rb +15 -6
- data/lib/openai/models/responses/response_create_params.rb +15 -6
- data/lib/openai/models/responses/responses_client_event.rb +15 -6
- data/lib/openai/models/webhooks/live_call_incoming_webhook_event.rb +121 -0
- data/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +6 -3
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +9 -2
- data/lib/openai/resources/audio/transcriptions.rb +12 -4
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +2 -0
- data/rbi/openai/models/audio/transcription.rbi +19 -0
- data/rbi/openai/models/audio/transcription_create_params.rbi +31 -3
- data/rbi/openai/models/audio/transcription_language.rbi +33 -0
- data/rbi/openai/models/audio/transcription_text_done_event.rbi +19 -0
- data/rbi/openai/models/audio_model.rbi +2 -0
- data/rbi/openai/models/beta/beta_response.rbi +23 -9
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +26 -9
- data/rbi/openai/models/beta/response_create_params.rbi +26 -9
- data/rbi/openai/models/chat/chat_completion.rbi +26 -9
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +26 -9
- data/rbi/openai/models/chat/completion_create_params.rbi +26 -9
- data/rbi/openai/models/realtime/audio_transcription.rbi +50 -9
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +19 -0
- data/rbi/openai/models/responses/response.rbi +23 -9
- data/rbi/openai/models/responses/response_create_params.rbi +26 -9
- data/rbi/openai/models/responses/responses_client_event.rbi +26 -9
- data/rbi/openai/models/webhooks/live_call_incoming_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +7 -3
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +1 -0
- data/rbi/openai/resources/audio/transcriptions.rbi +20 -2
- data/rbi/openai/resources/beta/responses.rbi +14 -6
- data/rbi/openai/resources/chat/completions.rbi +14 -6
- data/rbi/openai/resources/responses.rbi +14 -6
- data/rbi/openai/resources/webhooks.rbi +1 -0
- data/sig/openai/models/audio/transcription.rbs +9 -0
- data/sig/openai/models/audio/transcription_create_params.rbs +14 -0
- data/sig/openai/models/audio/transcription_language.rbs +15 -0
- data/sig/openai/models/audio/transcription_text_done_event.rbs +9 -0
- data/sig/openai/models/audio_model.rbs +2 -0
- data/sig/openai/models/beta/beta_response.rbs +3 -1
- data/sig/openai/models/beta/beta_responses_client_event.rbs +3 -1
- data/sig/openai/models/beta/response_create_params.rbs +3 -1
- data/sig/openai/models/chat/chat_completion.rbs +3 -1
- data/sig/openai/models/chat/chat_completion_chunk.rbs +3 -1
- data/sig/openai/models/chat/completion_create_params.rbs +3 -1
- data/sig/openai/models/realtime/audio_transcription.rbs +18 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbs +9 -0
- data/sig/openai/models/responses/response.rbs +3 -1
- data/sig/openai/models/responses/response_create_params.rbs +3 -1
- data/sig/openai/models/responses/responses_client_event.rbs +3 -1
- data/sig/openai/models/webhooks/live_call_incoming_webhook_event.rbs +90 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
- data/sig/openai/resources/audio/transcriptions.rbs +4 -0
- data/sig/openai/resources/webhooks.rbs +1 -0
- metadata +8 -2
|
@@ -277,9 +277,13 @@ module OpenAI
|
|
|
277
277
|
# will use 'default'.
|
|
278
278
|
# - If set to 'default', then the request will be processed with the standard
|
|
279
279
|
# pricing and performance for the selected model.
|
|
280
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
281
|
-
#
|
|
282
|
-
#
|
|
280
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
281
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
282
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
283
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
284
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
285
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
286
|
+
# request.
|
|
283
287
|
# - When not set, the default behavior is 'auto'.
|
|
284
288
|
#
|
|
285
289
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -613,9 +617,13 @@ module OpenAI
|
|
|
613
617
|
# will use 'default'.
|
|
614
618
|
# - If set to 'default', then the request will be processed with the standard
|
|
615
619
|
# pricing and performance for the selected model.
|
|
616
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
617
|
-
#
|
|
618
|
-
#
|
|
620
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
621
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
622
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
623
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
624
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
625
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
626
|
+
# request.
|
|
619
627
|
# - When not set, the default behavior is 'auto'.
|
|
620
628
|
#
|
|
621
629
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2416,9 +2424,13 @@ module OpenAI
|
|
|
2416
2424
|
# will use 'default'.
|
|
2417
2425
|
# - If set to 'default', then the request will be processed with the standard
|
|
2418
2426
|
# pricing and performance for the selected model.
|
|
2419
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
2420
|
-
#
|
|
2421
|
-
#
|
|
2427
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
2428
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
2429
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
2430
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
2431
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2432
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2433
|
+
# request.
|
|
2422
2434
|
# - When not set, the default behavior is 'auto'.
|
|
2423
2435
|
#
|
|
2424
2436
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2450,6 +2462,8 @@ module OpenAI
|
|
|
2450
2462
|
:priority,
|
|
2451
2463
|
OpenAI::Beta::BetaResponse::ServiceTier::TaggedSymbol
|
|
2452
2464
|
)
|
|
2465
|
+
FAST =
|
|
2466
|
+
T.let(:fast, OpenAI::Beta::BetaResponse::ServiceTier::TaggedSymbol)
|
|
2453
2467
|
|
|
2454
2468
|
sig do
|
|
2455
2469
|
override.returns(
|
|
@@ -331,9 +331,13 @@ module OpenAI
|
|
|
331
331
|
# will use 'default'.
|
|
332
332
|
# - If set to 'default', then the request will be processed with the standard
|
|
333
333
|
# pricing and performance for the selected model.
|
|
334
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
335
|
-
#
|
|
336
|
-
#
|
|
334
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
335
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
336
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
337
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
338
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
339
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
340
|
+
# request.
|
|
337
341
|
# - When not set, the default behavior is 'auto'.
|
|
338
342
|
#
|
|
339
343
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -806,9 +810,13 @@ module OpenAI
|
|
|
806
810
|
# will use 'default'.
|
|
807
811
|
# - If set to 'default', then the request will be processed with the standard
|
|
808
812
|
# pricing and performance for the selected model.
|
|
809
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
810
|
-
#
|
|
811
|
-
#
|
|
813
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
814
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
815
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
816
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
817
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
818
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
819
|
+
# request.
|
|
812
820
|
# - When not set, the default behavior is 'auto'.
|
|
813
821
|
#
|
|
814
822
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2623,9 +2631,13 @@ module OpenAI
|
|
|
2623
2631
|
# will use 'default'.
|
|
2624
2632
|
# - If set to 'default', then the request will be processed with the standard
|
|
2625
2633
|
# pricing and performance for the selected model.
|
|
2626
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
2627
|
-
#
|
|
2628
|
-
#
|
|
2634
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
2635
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
2636
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
2637
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
2638
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2639
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2640
|
+
# request.
|
|
2629
2641
|
# - When not set, the default behavior is 'auto'.
|
|
2630
2642
|
#
|
|
2631
2643
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2669,6 +2681,11 @@ module OpenAI
|
|
|
2669
2681
|
:priority,
|
|
2670
2682
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
|
|
2671
2683
|
)
|
|
2684
|
+
FAST =
|
|
2685
|
+
T.let(
|
|
2686
|
+
:fast,
|
|
2687
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
|
|
2688
|
+
)
|
|
2672
2689
|
|
|
2673
2690
|
sig do
|
|
2674
2691
|
override.returns(
|
|
@@ -280,9 +280,13 @@ module OpenAI
|
|
|
280
280
|
# will use 'default'.
|
|
281
281
|
# - If set to 'default', then the request will be processed with the standard
|
|
282
282
|
# pricing and performance for the selected model.
|
|
283
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
284
|
-
#
|
|
285
|
-
#
|
|
283
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
284
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
285
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
286
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
287
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
288
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
289
|
+
# request.
|
|
286
290
|
# - When not set, the default behavior is 'auto'.
|
|
287
291
|
#
|
|
288
292
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -738,9 +742,13 @@ module OpenAI
|
|
|
738
742
|
# will use 'default'.
|
|
739
743
|
# - If set to 'default', then the request will be processed with the standard
|
|
740
744
|
# pricing and performance for the selected model.
|
|
741
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
742
|
-
#
|
|
743
|
-
#
|
|
745
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
746
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
747
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
748
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
749
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
750
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
751
|
+
# request.
|
|
744
752
|
# - When not set, the default behavior is 'auto'.
|
|
745
753
|
#
|
|
746
754
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2524,9 +2532,13 @@ module OpenAI
|
|
|
2524
2532
|
# will use 'default'.
|
|
2525
2533
|
# - If set to 'default', then the request will be processed with the standard
|
|
2526
2534
|
# pricing and performance for the selected model.
|
|
2527
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
2528
|
-
#
|
|
2529
|
-
#
|
|
2535
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
2536
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
2537
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
2538
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
2539
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2540
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2541
|
+
# request.
|
|
2530
2542
|
# - When not set, the default behavior is 'auto'.
|
|
2531
2543
|
#
|
|
2532
2544
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2567,6 +2579,11 @@ module OpenAI
|
|
|
2567
2579
|
:priority,
|
|
2568
2580
|
OpenAI::Beta::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
2569
2581
|
)
|
|
2582
|
+
FAST =
|
|
2583
|
+
T.let(
|
|
2584
|
+
:fast,
|
|
2585
|
+
OpenAI::Beta::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
2586
|
+
)
|
|
2570
2587
|
|
|
2571
2588
|
sig do
|
|
2572
2589
|
override.returns(
|
|
@@ -52,9 +52,13 @@ module OpenAI
|
|
|
52
52
|
# will use 'default'.
|
|
53
53
|
# - If set to 'default', then the request will be processed with the standard
|
|
54
54
|
# pricing and performance for the selected model.
|
|
55
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
56
|
-
#
|
|
57
|
-
#
|
|
55
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
56
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
57
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
58
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
59
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
60
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
61
|
+
# request.
|
|
58
62
|
# - When not set, the default behavior is 'auto'.
|
|
59
63
|
#
|
|
60
64
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -122,9 +126,13 @@ module OpenAI
|
|
|
122
126
|
# will use 'default'.
|
|
123
127
|
# - If set to 'default', then the request will be processed with the standard
|
|
124
128
|
# pricing and performance for the selected model.
|
|
125
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
126
|
-
#
|
|
127
|
-
#
|
|
129
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
130
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
131
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
132
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
133
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
134
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
135
|
+
# request.
|
|
128
136
|
# - When not set, the default behavior is 'auto'.
|
|
129
137
|
#
|
|
130
138
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -985,9 +993,13 @@ module OpenAI
|
|
|
985
993
|
# will use 'default'.
|
|
986
994
|
# - If set to 'default', then the request will be processed with the standard
|
|
987
995
|
# pricing and performance for the selected model.
|
|
988
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
989
|
-
#
|
|
990
|
-
#
|
|
996
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
997
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
998
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
999
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1000
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1001
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1002
|
+
# request.
|
|
991
1003
|
# - When not set, the default behavior is 'auto'.
|
|
992
1004
|
#
|
|
993
1005
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1028,6 +1040,11 @@ module OpenAI
|
|
|
1028
1040
|
:priority,
|
|
1029
1041
|
OpenAI::Chat::ChatCompletion::ServiceTier::TaggedSymbol
|
|
1030
1042
|
)
|
|
1043
|
+
FAST =
|
|
1044
|
+
T.let(
|
|
1045
|
+
:fast,
|
|
1046
|
+
OpenAI::Chat::ChatCompletion::ServiceTier::TaggedSymbol
|
|
1047
|
+
)
|
|
1031
1048
|
|
|
1032
1049
|
sig do
|
|
1033
1050
|
override.returns(
|
|
@@ -56,9 +56,13 @@ module OpenAI
|
|
|
56
56
|
# will use 'default'.
|
|
57
57
|
# - If set to 'default', then the request will be processed with the standard
|
|
58
58
|
# pricing and performance for the selected model.
|
|
59
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
60
|
-
#
|
|
61
|
-
#
|
|
59
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
60
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
61
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
62
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
63
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
64
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
65
|
+
# request.
|
|
62
66
|
# - When not set, the default behavior is 'auto'.
|
|
63
67
|
#
|
|
64
68
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -139,9 +143,13 @@ module OpenAI
|
|
|
139
143
|
# will use 'default'.
|
|
140
144
|
# - If set to 'default', then the request will be processed with the standard
|
|
141
145
|
# pricing and performance for the selected model.
|
|
142
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
143
|
-
#
|
|
144
|
-
#
|
|
146
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
147
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
148
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
149
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
150
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
151
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
152
|
+
# request.
|
|
145
153
|
# - When not set, the default behavior is 'auto'.
|
|
146
154
|
#
|
|
147
155
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1409,9 +1417,13 @@ module OpenAI
|
|
|
1409
1417
|
# will use 'default'.
|
|
1410
1418
|
# - If set to 'default', then the request will be processed with the standard
|
|
1411
1419
|
# pricing and performance for the selected model.
|
|
1412
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1413
|
-
#
|
|
1414
|
-
#
|
|
1420
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1421
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1422
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1423
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1424
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1425
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1426
|
+
# request.
|
|
1415
1427
|
# - When not set, the default behavior is 'auto'.
|
|
1416
1428
|
#
|
|
1417
1429
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1452,6 +1464,11 @@ module OpenAI
|
|
|
1452
1464
|
:priority,
|
|
1453
1465
|
OpenAI::Chat::ChatCompletionChunk::ServiceTier::TaggedSymbol
|
|
1454
1466
|
)
|
|
1467
|
+
FAST =
|
|
1468
|
+
T.let(
|
|
1469
|
+
:fast,
|
|
1470
|
+
OpenAI::Chat::ChatCompletionChunk::ServiceTier::TaggedSymbol
|
|
1471
|
+
)
|
|
1455
1472
|
|
|
1456
1473
|
sig do
|
|
1457
1474
|
override.returns(
|
|
@@ -358,9 +358,13 @@ module OpenAI
|
|
|
358
358
|
# will use 'default'.
|
|
359
359
|
# - If set to 'default', then the request will be processed with the standard
|
|
360
360
|
# pricing and performance for the selected model.
|
|
361
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
362
|
-
#
|
|
363
|
-
#
|
|
361
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
362
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
363
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
364
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
365
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
366
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
367
|
+
# request.
|
|
364
368
|
# - When not set, the default behavior is 'auto'.
|
|
365
369
|
#
|
|
366
370
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -804,9 +808,13 @@ module OpenAI
|
|
|
804
808
|
# will use 'default'.
|
|
805
809
|
# - If set to 'default', then the request will be processed with the standard
|
|
806
810
|
# pricing and performance for the selected model.
|
|
807
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
808
|
-
#
|
|
809
|
-
#
|
|
811
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
812
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
813
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
814
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
815
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
816
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
817
|
+
# request.
|
|
810
818
|
# - When not set, the default behavior is 'auto'.
|
|
811
819
|
#
|
|
812
820
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1734,9 +1742,13 @@ module OpenAI
|
|
|
1734
1742
|
# will use 'default'.
|
|
1735
1743
|
# - If set to 'default', then the request will be processed with the standard
|
|
1736
1744
|
# pricing and performance for the selected model.
|
|
1737
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1738
|
-
#
|
|
1739
|
-
#
|
|
1745
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1746
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1747
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1748
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1749
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1750
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1751
|
+
# request.
|
|
1740
1752
|
# - When not set, the default behavior is 'auto'.
|
|
1741
1753
|
#
|
|
1742
1754
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1777,6 +1789,11 @@ module OpenAI
|
|
|
1777
1789
|
:priority,
|
|
1778
1790
|
OpenAI::Chat::CompletionCreateParams::ServiceTier::TaggedSymbol
|
|
1779
1791
|
)
|
|
1792
|
+
FAST =
|
|
1793
|
+
T.let(
|
|
1794
|
+
:fast,
|
|
1795
|
+
OpenAI::Chat::CompletionCreateParams::ServiceTier::TaggedSymbol
|
|
1796
|
+
)
|
|
1780
1797
|
|
|
1781
1798
|
sig do
|
|
1782
1799
|
override.returns(
|
|
@@ -29,6 +29,14 @@ module OpenAI
|
|
|
29
29
|
end
|
|
30
30
|
attr_writer :delay
|
|
31
31
|
|
|
32
|
+
# Words or phrases to guide transcription of the input audio. Supported by
|
|
33
|
+
# `gpt-transcribe` and `gpt-live-transcribe`.
|
|
34
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
35
|
+
attr_reader :keywords
|
|
36
|
+
|
|
37
|
+
sig { params(keywords: T::Array[String]).void }
|
|
38
|
+
attr_writer :keywords
|
|
39
|
+
|
|
32
40
|
# The language of the input audio. Supplying the input language in
|
|
33
41
|
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
|
34
42
|
# format will improve accuracy and latency.
|
|
@@ -38,10 +46,20 @@ module OpenAI
|
|
|
38
46
|
sig { params(language: String).void }
|
|
39
47
|
attr_writer :language
|
|
40
48
|
|
|
49
|
+
# Possible languages of the input audio, in
|
|
50
|
+
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
51
|
+
# Supported by `gpt-transcribe` and `gpt-live-transcribe`.
|
|
52
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
53
|
+
attr_reader :languages
|
|
54
|
+
|
|
55
|
+
sig { params(languages: T::Array[String]).void }
|
|
56
|
+
attr_writer :languages
|
|
57
|
+
|
|
41
58
|
# The model to use for transcription. Current options are `whisper-1`,
|
|
42
|
-
# `gpt-
|
|
43
|
-
# `gpt-4o-transcribe`, `gpt-4o-transcribe
|
|
44
|
-
#
|
|
59
|
+
# `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`,
|
|
60
|
+
# `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
|
61
|
+
# `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
|
62
|
+
# `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
|
45
63
|
sig do
|
|
46
64
|
returns(
|
|
47
65
|
T.nilable(
|
|
@@ -80,7 +98,9 @@ module OpenAI
|
|
|
80
98
|
sig do
|
|
81
99
|
params(
|
|
82
100
|
delay: OpenAI::Realtime::AudioTranscription::Delay::OrSymbol,
|
|
101
|
+
keywords: T::Array[String],
|
|
83
102
|
language: String,
|
|
103
|
+
languages: T::Array[String],
|
|
84
104
|
model:
|
|
85
105
|
T.any(
|
|
86
106
|
String,
|
|
@@ -94,14 +114,22 @@ module OpenAI
|
|
|
94
114
|
# values can improve transcription accuracy at the cost of latency. Only supported
|
|
95
115
|
# with `gpt-realtime-whisper` in GA Realtime sessions.
|
|
96
116
|
delay: nil,
|
|
117
|
+
# Words or phrases to guide transcription of the input audio. Supported by
|
|
118
|
+
# `gpt-transcribe` and `gpt-live-transcribe`.
|
|
119
|
+
keywords: nil,
|
|
97
120
|
# The language of the input audio. Supplying the input language in
|
|
98
121
|
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
|
99
122
|
# format will improve accuracy and latency.
|
|
100
123
|
language: nil,
|
|
124
|
+
# Possible languages of the input audio, in
|
|
125
|
+
# [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
|
|
126
|
+
# Supported by `gpt-transcribe` and `gpt-live-transcribe`.
|
|
127
|
+
languages: nil,
|
|
101
128
|
# The model to use for transcription. Current options are `whisper-1`,
|
|
102
|
-
# `gpt-
|
|
103
|
-
# `gpt-4o-transcribe`, `gpt-4o-transcribe
|
|
104
|
-
#
|
|
129
|
+
# `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`,
|
|
130
|
+
# `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
|
131
|
+
# `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
|
132
|
+
# `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
|
105
133
|
model: nil,
|
|
106
134
|
# An optional text to guide the model's style or continue a previous audio
|
|
107
135
|
# segment. For `whisper-1`, the
|
|
@@ -117,7 +145,9 @@ module OpenAI
|
|
|
117
145
|
override.returns(
|
|
118
146
|
{
|
|
119
147
|
delay: OpenAI::Realtime::AudioTranscription::Delay::OrSymbol,
|
|
148
|
+
keywords: T::Array[String],
|
|
120
149
|
language: String,
|
|
150
|
+
languages: T::Array[String],
|
|
121
151
|
model:
|
|
122
152
|
T.any(
|
|
123
153
|
String,
|
|
@@ -180,9 +210,10 @@ module OpenAI
|
|
|
180
210
|
end
|
|
181
211
|
|
|
182
212
|
# The model to use for transcription. Current options are `whisper-1`,
|
|
183
|
-
# `gpt-
|
|
184
|
-
# `gpt-4o-transcribe`, `gpt-4o-transcribe
|
|
185
|
-
#
|
|
213
|
+
# `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`,
|
|
214
|
+
# `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
|
215
|
+
# `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
|
216
|
+
# `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
|
186
217
|
module Model
|
|
187
218
|
extend OpenAI::Internal::Type::Union
|
|
188
219
|
|
|
@@ -213,6 +244,16 @@ module OpenAI
|
|
|
213
244
|
:"whisper-1",
|
|
214
245
|
OpenAI::Realtime::AudioTranscription::Model::TaggedSymbol
|
|
215
246
|
)
|
|
247
|
+
GPT_TRANSCRIBE =
|
|
248
|
+
T.let(
|
|
249
|
+
:"gpt-transcribe",
|
|
250
|
+
OpenAI::Realtime::AudioTranscription::Model::TaggedSymbol
|
|
251
|
+
)
|
|
252
|
+
GPT_LIVE_TRANSCRIBE =
|
|
253
|
+
T.let(
|
|
254
|
+
:"gpt-live-transcribe",
|
|
255
|
+
OpenAI::Realtime::AudioTranscription::Model::TaggedSymbol
|
|
256
|
+
)
|
|
216
257
|
GPT_4O_MINI_TRANSCRIBE =
|
|
217
258
|
T.let(
|
|
218
259
|
:"gpt-4o-mini-transcribe",
|
data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi
CHANGED
|
@@ -44,6 +44,20 @@ module OpenAI
|
|
|
44
44
|
end
|
|
45
45
|
attr_accessor :usage
|
|
46
46
|
|
|
47
|
+
# The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
48
|
+
# array indicates that no language could be reliably detected.
|
|
49
|
+
sig do
|
|
50
|
+
returns(T.nilable(T::Array[OpenAI::Audio::TranscriptionLanguage]))
|
|
51
|
+
end
|
|
52
|
+
attr_reader :languages
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
languages: T::Array[OpenAI::Audio::TranscriptionLanguage::OrHash]
|
|
57
|
+
).void
|
|
58
|
+
end
|
|
59
|
+
attr_writer :languages
|
|
60
|
+
|
|
47
61
|
# The log probabilities of the transcription.
|
|
48
62
|
sig do
|
|
49
63
|
returns(T.nilable(T::Array[OpenAI::Realtime::LogProbProperties]))
|
|
@@ -71,6 +85,7 @@ module OpenAI
|
|
|
71
85
|
OpenAI::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens::OrHash,
|
|
72
86
|
OpenAI::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageDuration::OrHash
|
|
73
87
|
),
|
|
88
|
+
languages: T::Array[OpenAI::Audio::TranscriptionLanguage::OrHash],
|
|
74
89
|
logprobs:
|
|
75
90
|
T.nilable(T::Array[OpenAI::Realtime::LogProbProperties::OrHash]),
|
|
76
91
|
type: Symbol
|
|
@@ -88,6 +103,9 @@ module OpenAI
|
|
|
88
103
|
# Usage statistics for the transcription, this is billed according to the ASR
|
|
89
104
|
# model's pricing rather than the realtime model's pricing.
|
|
90
105
|
usage:,
|
|
106
|
+
# The languages detected in the audio. Returned by `gpt-transcribe`. An empty
|
|
107
|
+
# array indicates that no language could be reliably detected.
|
|
108
|
+
languages: nil,
|
|
91
109
|
# The log probabilities of the transcription.
|
|
92
110
|
logprobs: nil,
|
|
93
111
|
# The event type, must be `conversation.item.input_audio_transcription.completed`.
|
|
@@ -108,6 +126,7 @@ module OpenAI
|
|
|
108
126
|
OpenAI::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageTokens,
|
|
109
127
|
OpenAI::Realtime::ConversationItemInputAudioTranscriptionCompletedEvent::Usage::TranscriptTextUsageDuration
|
|
110
128
|
),
|
|
129
|
+
languages: T::Array[OpenAI::Audio::TranscriptionLanguage],
|
|
111
130
|
logprobs: T.nilable(T::Array[OpenAI::Realtime::LogProbProperties])
|
|
112
131
|
}
|
|
113
132
|
)
|
|
@@ -275,9 +275,13 @@ module OpenAI
|
|
|
275
275
|
# will use 'default'.
|
|
276
276
|
# - If set to 'default', then the request will be processed with the standard
|
|
277
277
|
# pricing and performance for the selected model.
|
|
278
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
279
|
-
#
|
|
280
|
-
#
|
|
278
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
279
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
280
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
281
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
282
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
283
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
284
|
+
# request.
|
|
281
285
|
# - When not set, the default behavior is 'auto'.
|
|
282
286
|
#
|
|
283
287
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -613,9 +617,13 @@ module OpenAI
|
|
|
613
617
|
# will use 'default'.
|
|
614
618
|
# - If set to 'default', then the request will be processed with the standard
|
|
615
619
|
# pricing and performance for the selected model.
|
|
616
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
617
|
-
#
|
|
618
|
-
#
|
|
620
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
621
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
622
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
623
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
624
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
625
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
626
|
+
# request.
|
|
619
627
|
# - When not set, the default behavior is 'auto'.
|
|
620
628
|
#
|
|
621
629
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1559,9 +1567,13 @@ module OpenAI
|
|
|
1559
1567
|
# will use 'default'.
|
|
1560
1568
|
# - If set to 'default', then the request will be processed with the standard
|
|
1561
1569
|
# pricing and performance for the selected model.
|
|
1562
|
-
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)'
|
|
1563
|
-
#
|
|
1564
|
-
#
|
|
1570
|
+
# - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
1571
|
+
# then the request will be processed with the Flex Processing service tier.
|
|
1572
|
+
# - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
1573
|
+
# include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
1574
|
+
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1575
|
+
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1576
|
+
# request.
|
|
1565
1577
|
# - When not set, the default behavior is 'auto'.
|
|
1566
1578
|
#
|
|
1567
1579
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1596,6 +1608,8 @@ module OpenAI
|
|
|
1596
1608
|
:priority,
|
|
1597
1609
|
OpenAI::Responses::Response::ServiceTier::TaggedSymbol
|
|
1598
1610
|
)
|
|
1611
|
+
FAST =
|
|
1612
|
+
T.let(:fast, OpenAI::Responses::Response::ServiceTier::TaggedSymbol)
|
|
1599
1613
|
|
|
1600
1614
|
sig do
|
|
1601
1615
|
override.returns(
|