forked from Azure-Samples/aoai-realtime-audio-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
realtime-openapi3.yml
1693 lines (1692 loc) · 48.7 KB
/
realtime-openapi3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: OpenAI API
description: The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
version: 0.0.0
tags:
- name: Realtime
paths:
/realtime:
post:
operationId: Realtime_startRealtimeSession
summary: Starts a real-time conversation session.
parameters: []
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
tags:
- Realtime
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
security:
- BearerAuth: []
components:
schemas:
Realtime.RealtimeAudioFormat:
anyOf:
- type: string
- type: string
enum:
- pcm16
- g711_ulaw
- g711_alaw
Realtime.RealtimeAudioInputTranscriptionModel:
anyOf:
- type: string
- type: string
enum:
- whisper-1
Realtime.RealtimeAudioInputTranscriptionSettings:
type: object
properties:
model:
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeAudioInputTranscriptionModel'
default: whisper-1
Realtime.RealtimeContentPart:
type: object
required:
- type
properties:
type:
$ref: '#/components/schemas/Realtime.RealtimeContentPartType'
discriminator:
propertyName: type
mapping:
input_text: '#/components/schemas/Realtime.RealtimeRequestTextContentPart'
input_audio: '#/components/schemas/Realtime.RealtimeRequestAudioContentPart'
text: '#/components/schemas/Realtime.RealtimeResponseTextContentPart'
audio: '#/components/schemas/Realtime.RealtimeResponseAudioContentPart'
Realtime.RealtimeContentPartType:
anyOf:
- type: string
- type: string
enum:
- input_text
- input_audio
- text
- audio
Realtime.RealtimeFunctionTool:
type: object
required:
- type
- name
properties:
type:
type: string
enum:
- function
name:
type: string
description:
type: string
parameters: {}
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeTool'
description: The definition of a function tool as used by the realtime endpoint.
Realtime.RealtimeItemStatus:
anyOf:
- type: string
- type: string
enum:
- in_progress
- completed
- incomplete
Realtime.RealtimeItemType:
anyOf:
- type: string
- type: string
enum:
- message
- function_call
- function_call_output
Realtime.RealtimeMessageRole:
anyOf:
- type: string
- type: string
enum:
- system
- user
- assistant
Realtime.RealtimeRequestAssistantMessageItem:
type: object
required:
- role
- content
properties:
role:
type: string
enum:
- assistant
content:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeRequestTextContentPart'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestMessageItem'
Realtime.RealtimeRequestAudioContentPart:
type: object
required:
- type
properties:
type:
type: string
enum:
- input_audio
transcript:
type: string
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeContentPart'
Realtime.RealtimeRequestCommand:
type: object
required:
- type
properties:
type:
$ref: '#/components/schemas/Realtime.RealtimeRequestCommandType'
event_id:
type: string
discriminator:
propertyName: type
mapping:
session.update: '#/components/schemas/Realtime.RealtimeRequestSessionUpdateCommand'
input_audio_buffer.append: '#/components/schemas/Realtime.RealtimeRequestInputAudioBufferAppendCommand'
input_audio_buffer.commit: '#/components/schemas/Realtime.RealtimeRequestInputAudioBufferCommitCommand'
input_audio_buffer.clear: '#/components/schemas/Realtime.RealtimeRequestInputAudioBufferClearCommand'
conversation.item.create: '#/components/schemas/Realtime.RealtimeRequestItemCreateCommand'
conversation.item.delete: '#/components/schemas/Realtime.RealtimeRequestItemDeleteCommand'
conversation.item.truncate: '#/components/schemas/Realtime.RealtimeRequestItemTruncateCommand'
response.create: '#/components/schemas/Realtime.RealtimeRequestResponseCreateCommand'
response.cancel: '#/components/schemas/Realtime.RealtimeRequestResponseCancelCommand'
description: A base representation for messages sent by the client to the service.
Realtime.RealtimeRequestCommandType:
anyOf:
- type: string
- type: string
enum:
- session.update
- input_audio_buffer.append
- input_audio_buffer.commit
- input_audio_buffer.clear
- conversation.item.create
- conversation.item.delete
- conversation.item.truncate
- response.create
- response.cancel
Realtime.RealtimeRequestFunctionCallItem:
type: object
required:
- type
- name
- call_id
- arguments
properties:
type:
type: string
enum:
- function_call
name:
type: string
call_id:
type: string
arguments:
type: string
status:
$ref: '#/components/schemas/Realtime.RealtimeItemStatus'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestItem'
Realtime.RealtimeRequestFunctionCallOutputItem:
type: object
required:
- type
- call_id
- output
properties:
type:
type: string
enum:
- function_call_output
call_id:
type: string
output:
type: string
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestItem'
Realtime.RealtimeRequestInputAudioBufferAppendCommand:
type: object
required:
- type
- audio
properties:
type:
type: string
enum:
- input_audio_buffer.append
audio:
type: string
format: base64
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestInputAudioBufferClearCommand:
type: object
required:
- type
properties:
type:
type: string
enum:
- input_audio_buffer.clear
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestInputAudioBufferCommitCommand:
type: object
required:
- type
properties:
type:
type: string
enum:
- input_audio_buffer.commit
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestItem:
type: object
required:
- type
properties:
type:
$ref: '#/components/schemas/Realtime.RealtimeItemType'
id:
type: string
discriminator:
propertyName: type
mapping:
message: '#/components/schemas/Realtime.RealtimeRequestMessageItem'
function_call: '#/components/schemas/Realtime.RealtimeRequestFunctionCallItem'
function_call_output: '#/components/schemas/Realtime.RealtimeRequestFunctionCallOutputItem'
Realtime.RealtimeRequestItemCreateCommand:
type: object
required:
- type
- item
properties:
type:
type: string
enum:
- conversation.item.create
previous_item_id:
type: string
item:
$ref: '#/components/schemas/Realtime.RealtimeRequestItem'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestItemDeleteCommand:
type: object
required:
- type
- item_id
properties:
type:
type: string
enum:
- conversation.item.delete
item_id:
type: string
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestItemTruncateCommand:
type: object
required:
- type
- item_id
- content_index
- audio_end_ms
properties:
type:
type: string
enum:
- conversation.item.truncate
item_id:
type: string
content_index:
type: integer
format: int32
audio_end_ms:
type: integer
format: int32
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestMessageItem:
type: object
required:
- type
- role
properties:
type:
type: string
enum:
- message
role:
$ref: '#/components/schemas/Realtime.RealtimeMessageRole'
status:
$ref: '#/components/schemas/Realtime.RealtimeItemStatus'
discriminator:
propertyName: role
mapping:
system: '#/components/schemas/Realtime.RealtimeRequestSystemMessageItem'
user: '#/components/schemas/Realtime.RealtimeRequestUserMessageItem'
assistant: '#/components/schemas/Realtime.RealtimeRequestAssistantMessageItem'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestItem'
Realtime.RealtimeRequestMessageReferenceItem:
type: object
required:
- type
- id
properties:
type:
type: string
enum:
- message
id:
type: string
Realtime.RealtimeRequestModel:
anyOf:
- type: string
- type: string
enum:
- gpt-4o-realtime
Realtime.RealtimeRequestResponseCancelCommand:
type: object
required:
- type
properties:
type:
type: string
enum:
- response.cancel
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestResponseCreateCommand:
type: object
required:
- type
properties:
type:
type: string
enum:
- response.create
response:
type: object
properties:
commit:
type: boolean
default: true
cancel_previous:
type: boolean
default: true
append_input_items:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeRequestItem'
input_items:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeRequestItem'
instructions:
type: string
modalities:
type: array
items:
type: string
enum:
- text
- audio
voice:
$ref: '#/components/schemas/Realtime.RealtimeVoice'
temperature:
type: number
format: float
max_output_tokens:
anyOf:
- type: integer
format: int32
- type: string
enum:
- inf
nullable: true
tools:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeTool'
tool_choice:
$ref: '#/components/schemas/Realtime.RealtimeToolChoice'
output_audio_format:
$ref: '#/components/schemas/Realtime.RealtimeAudioFormat'
required:
- commit
- cancel_previous
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
description: |-
Trigger model inference to generate a model turn, the response will be streamed back with
a series of events, starting with an add_message event and ending with a turn_finished event.
If functions are enabled the response may be two, the second being a tool_call.
Fields:
- conversation_label: References a conversation. If empty or set to a label that does not exist,
Generate will create a new conversation, otherwise it will be based on the context of the
existing conversation.
- commit: If true, the generated messages will be appended to the end of the conversation.
Only valid if conversation_label is set.
- cancel_previous: If True, the generation will cancel any pending generation for that specific
conversation. If False, the generation will be queued and will be generated after the
previous generation has completed.
- append_messages: If set, these messages will be appended to the end of the conversation before
a response is generated. If commit is false, these messages will be discarded. This can only
be done with an existing conversation, and thus will throw an error if conversation_label is
not set or does not exist.
- messages: If conversation_label is not set or does not exist, this will be the initial messages
of the conversation, i.e. the context of the generation. If the conversation exists, this will
throw an error.
Realtime.RealtimeRequestSessionUpdateCommand:
type: object
required:
- type
- session
properties:
type:
type: string
enum:
- session.update
session:
type: object
properties:
model:
$ref: '#/components/schemas/Realtime.RealtimeRequestModel'
modalities:
type: array
items:
type: string
enum:
- text
- audio
voice:
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeVoice'
default: alloy
instructions:
type: string
input_audio_format:
$ref: '#/components/schemas/Realtime.RealtimeAudioFormat'
output_audio_format:
$ref: '#/components/schemas/Realtime.RealtimeAudioFormat'
input_audio_transcription:
$ref: '#/components/schemas/Realtime.RealtimeAudioInputTranscriptionSettings'
turn_detection:
$ref: '#/components/schemas/Realtime.RealtimeTurnDetection'
tools:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeTool'
tool_choice:
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeToolChoice'
default: auto
temperature:
type: number
format: float
max_response_output_tokens:
anyOf:
- type: integer
format: int32
- type: string
enum:
- inf
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestCommand'
Realtime.RealtimeRequestSystemMessageItem:
type: object
required:
- role
- content
properties:
role:
type: string
enum:
- system
content:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeRequestTextContentPart'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestMessageItem'
Realtime.RealtimeRequestTextContentPart:
type: object
required:
- type
- text
properties:
type:
type: string
enum:
- input_text
text:
type: string
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeContentPart'
Realtime.RealtimeRequestUserMessageItem:
type: object
required:
- role
- content
properties:
role:
type: string
enum:
- user
content:
type: array
items:
anyOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestTextContentPart'
- $ref: '#/components/schemas/Realtime.RealtimeRequestAudioContentPart'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeRequestMessageItem'
Realtime.RealtimeResponse:
type: object
required:
- object
- id
- status
- status_details
- output
- usage
properties:
object:
type: string
enum:
- realtime.response
id:
type: string
status:
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseStatus'
default: in_progress
status_details:
type: object
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseStatusDetails'
nullable: true
output:
type: array
items:
$ref: '#/components/schemas/Realtime.RealtimeResponseItem'
usage:
type: object
properties:
total_tokens:
type: integer
format: int32
input_tokens:
type: integer
format: int32
output_tokens:
type: integer
format: int32
input_token_details:
type: object
properties:
cached_tokens:
type: integer
format: int32
text_tokens:
type: integer
format: int32
audio_tokens:
type: integer
format: int32
required:
- cached_tokens
- text_tokens
- audio_tokens
output_token_details:
type: object
properties:
text_tokens:
type: integer
format: int32
audio_tokens:
type: integer
format: int32
required:
- text_tokens
- audio_tokens
required:
- total_tokens
- input_tokens
- output_tokens
- input_token_details
- output_token_details
Realtime.RealtimeResponseApiError:
type: object
required:
- type
- message
properties:
type:
type: string
code:
type: string
message:
type: string
param:
type: string
Realtime.RealtimeResponseAudioContentPart:
type: object
required:
- type
- transcript
properties:
type:
type: string
enum:
- audio
transcript:
type: string
nullable: true
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeContentPart'
Realtime.RealtimeResponseAudioDeltaCommand:
type: object
required:
- type
- response_id
- item_id
- output_index
- content_index
- delta
properties:
type:
type: string
enum:
- response.audio.delta
response_id:
type: string
item_id:
type: string
output_index:
type: integer
format: int32
content_index:
type: integer
format: int32
delta:
type: string
format: base64
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseAudioDoneCommand:
type: object
required:
- type
- response_id
- item_id
- output_index
- content_index
properties:
type:
type: string
enum:
- response.audio.done
response_id:
type: string
item_id:
type: string
output_index:
type: integer
format: int32
content_index:
type: integer
format: int32
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseAudioTranscriptDeltaCommand:
type: object
required:
- type
- response_id
- item_id
- output_index
- content_index
- delta
properties:
type:
type: string
enum:
- response.audio_transcript.delta
response_id:
type: string
item_id:
type: string
output_index:
type: integer
format: int32
content_index:
type: integer
format: int32
delta:
type: string
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseAudioTranscriptDoneCommand:
type: object
required:
- type
- response_id
- item_id
- output_index
- content_index
properties:
type:
type: string
enum:
- response.audio_transcript.done
response_id:
type: string
item_id:
type: string
output_index:
type: integer
format: int32
content_index:
type: integer
format: int32
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseCancelledStatusDetails:
type: object
required:
- type
- reason
properties:
type:
type: string
enum:
- cancelled
reason:
type: string
enum:
- turn_detected
- client_cancelled
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseStatusDetails'
Realtime.RealtimeResponseCommand:
type: object
required:
- type
- event_id
properties:
type:
$ref: '#/components/schemas/Realtime.RealtimeResponseCommandType'
event_id:
type: string
nullable: true
discriminator:
propertyName: type
mapping:
session.created: '#/components/schemas/Realtime.RealtimeResponseSessionCreatedCommand'
session.updated: '#/components/schemas/Realtime.RealtimeResponseSessionUpdatedCommand'
conversation.item.created: '#/components/schemas/Realtime.RealtimeResponseItemCreatedCommand'
conversation.item.deleted: '#/components/schemas/Realtime.RealtimeResponseItemDeletedCommand'
conversation.item.truncated: '#/components/schemas/Realtime.RealtimeResponseItemTruncatedCommand'
response.created: '#/components/schemas/Realtime.RealtimeResponseCreatedCommand'
response.done: '#/components/schemas/Realtime.RealtimeResponseDoneCommand'
rate_limits.updated: '#/components/schemas/Realtime.RealtimeResponseRateLimitsUpdatedCommand'
response.output_item.added: '#/components/schemas/Realtime.RealtimeResponseOutputItemAddedCommand'
response.output_item.done: '#/components/schemas/Realtime.RealtimeResponseOutputItemDoneCommand'
response.content_part.added: '#/components/schemas/Realtime.RealtimeResponseContentPartAddedCommand'
response.content_part.done: '#/components/schemas/Realtime.RealtimeResponseContentPartDoneCommand'
response.audio.delta: '#/components/schemas/Realtime.RealtimeResponseAudioDeltaCommand'
response.audio.done: '#/components/schemas/Realtime.RealtimeResponseAudioDoneCommand'
response.audio_transcript.delta: '#/components/schemas/Realtime.RealtimeResponseAudioTranscriptDeltaCommand'
response.audio_transcript.done: '#/components/schemas/Realtime.RealtimeResponseAudioTranscriptDoneCommand'
response.text.delta: '#/components/schemas/Realtime.RealtimeResponseTextDeltaCommand'
response.text.done: '#/components/schemas/Realtime.RealtimeResponseTextDoneCommand'
response.function_call_arguments.delta: '#/components/schemas/Realtime.RealtimeResponseFunctionCallArgumentsDeltaCommand'
response.function_call_arguments.done: '#/components/schemas/Realtime.RealtimeResponseFunctionCallArgumentsDoneCommand'
input_audio_buffer.speech_started: '#/components/schemas/Realtime.RealtimeResponseInputAudioBufferSpeechStartedCommand'
input_audio_buffer.speech_stopped: '#/components/schemas/Realtime.RealtimeResponseInputAudioBufferSpeechStoppedCommand'
conversation.item.input_audio_transcription.completed: '#/components/schemas/Realtime.RealtimeResponseItemInputAudioTranscriptionCompletedCommand'
conversation.item.input_audio_transcription.failed: '#/components/schemas/Realtime.RealtimeResponseItemInputAudioTranscriptionFailedCommand'
input_audio_buffer.committed: '#/components/schemas/Realtime.RealtimeResponseInputAudioBufferCommittedCommand'
input_audio_buffer.cleared: '#/components/schemas/Realtime.RealtimeResponseInputAudioBufferClearedCommand'
error: '#/components/schemas/Realtime.RealtimeResponseErrorCommand'
description: Base representation of a WebSocket message received from the service.
Realtime.RealtimeResponseCommandType:
anyOf:
- type: string
- type: string
enum:
- session.created
- session.updated
- conversation.item.created
- conversation.item.deleted
- conversation.item.truncated
- response.created
- response.done
- rate_limits.updated
- response.output_item.added
- response.output_item.done
- response.content_part.added
- response.content_part.done
- response.audio.delta
- response.audio.done
- response.audio_transcript.delta
- response.audio_transcript.done
- response.text.delta
- response.text.done
- response.function_call_arguments.delta
- response.function_call_arguments.done
- input_audio_buffer.speech_started
- input_audio_buffer.speech_stopped
- conversation.item.input_audio_transcription.completed
- conversation.item.input_audio_transcription.failed
- input_audio_buffer.committed
- input_audio_buffer.cleared
- error
Realtime.RealtimeResponseContentPartAddedCommand:
type: object
required:
- type
- response_id
- item_id
- output_index
- content_index
- part
properties:
type:
type: string
enum:
- response.content_part.added
response_id:
type: string
item_id:
type: string
output_index:
type: integer
format: int32
content_index:
type: integer
format: int32
part:
$ref: '#/components/schemas/Realtime.RealtimeContentPart'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseContentPartDoneCommand:
type: object
required:
- type
- response_id
- item_id
- output_index
- content_index
- part
properties:
type:
type: string
enum:
- response.content_part.done
response_id:
type: string
item_id:
type: string
output_index:
type: integer
format: int32
content_index:
type: integer
format: int32
part:
$ref: '#/components/schemas/Realtime.RealtimeContentPart'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseCreatedCommand:
type: object
required:
- type
- response
properties:
type:
type: string
enum:
- response.created
response:
$ref: '#/components/schemas/Realtime.RealtimeResponse'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseDoneCommand:
type: object
required:
- type
- response
properties:
type:
type: string
enum:
- response.done
response:
$ref: '#/components/schemas/Realtime.RealtimeResponse'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
Realtime.RealtimeResponseError:
type: object
required:
- type
- message
properties:
type:
type: string
code:
type: string
message:
type: string
param:
type: string
event_id:
type: string
Realtime.RealtimeResponseErrorCommand:
type: object
required:
- type
- error
properties:
type:
type: string
enum:
- error
error:
$ref: '#/components/schemas/Realtime.RealtimeResponseError'
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseCommand'
description: A command that describes an error encountered during a realtime operation.
Realtime.RealtimeResponseFailedStatusDetails:
type: object
required:
- type
- error
properties:
type:
type: string
enum:
- failed
error: {}
allOf:
- $ref: '#/components/schemas/Realtime.RealtimeResponseStatusDetails'
Realtime.RealtimeResponseFunctionCallArgumentsDeltaCommand:
type: object
required: