PraisonAI 2.0.61__cp313-cp313-manylinux_2_39_x86_64.whl

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.

Potentially problematic release.


This version of PraisonAI might be problematic. Click here for more details.

Files changed (89) hide show
  1. praisonai/__init__.py +6 -0
  2. praisonai/__main__.py +10 -0
  3. praisonai/agents_generator.py +648 -0
  4. praisonai/api/call.py +292 -0
  5. praisonai/auto.py +238 -0
  6. praisonai/chainlit_ui.py +304 -0
  7. praisonai/cli.py +518 -0
  8. praisonai/deploy.py +138 -0
  9. praisonai/inbuilt_tools/__init__.py +24 -0
  10. praisonai/inbuilt_tools/autogen_tools.py +117 -0
  11. praisonai/inc/__init__.py +2 -0
  12. praisonai/inc/config.py +96 -0
  13. praisonai/inc/models.py +128 -0
  14. praisonai/public/android-chrome-192x192.png +0 -0
  15. praisonai/public/android-chrome-512x512.png +0 -0
  16. praisonai/public/apple-touch-icon.png +0 -0
  17. praisonai/public/fantasy.svg +3 -0
  18. praisonai/public/favicon-16x16.png +0 -0
  19. praisonai/public/favicon-32x32.png +0 -0
  20. praisonai/public/favicon.ico +0 -0
  21. praisonai/public/game.svg +3 -0
  22. praisonai/public/logo_dark.png +0 -0
  23. praisonai/public/logo_light.png +0 -0
  24. praisonai/public/movie.svg +3 -0
  25. praisonai/public/praison-ai-agents-architecture-dark.png +0 -0
  26. praisonai/public/praison-ai-agents-architecture.png +0 -0
  27. praisonai/public/thriller.svg +3 -0
  28. praisonai/setup/__init__.py +1 -0
  29. praisonai/setup/build.py +21 -0
  30. praisonai/setup/config.yaml +60 -0
  31. praisonai/setup/post_install.py +23 -0
  32. praisonai/setup/setup_conda_env.py +25 -0
  33. praisonai/setup/setup_conda_env.sh +72 -0
  34. praisonai/setup.py +16 -0
  35. praisonai/test.py +105 -0
  36. praisonai/train.py +276 -0
  37. praisonai/ui/README.md +21 -0
  38. praisonai/ui/agents.py +822 -0
  39. praisonai/ui/callbacks.py +57 -0
  40. praisonai/ui/chat.py +387 -0
  41. praisonai/ui/code.py +440 -0
  42. praisonai/ui/colab.py +474 -0
  43. praisonai/ui/colab_chainlit.py +81 -0
  44. praisonai/ui/components/aicoder.py +269 -0
  45. praisonai/ui/config/.chainlit/config.toml +120 -0
  46. praisonai/ui/config/.chainlit/translations/bn.json +231 -0
  47. praisonai/ui/config/.chainlit/translations/en-US.json +229 -0
  48. praisonai/ui/config/.chainlit/translations/gu.json +231 -0
  49. praisonai/ui/config/.chainlit/translations/he-IL.json +231 -0
  50. praisonai/ui/config/.chainlit/translations/hi.json +231 -0
  51. praisonai/ui/config/.chainlit/translations/kn.json +231 -0
  52. praisonai/ui/config/.chainlit/translations/ml.json +231 -0
  53. praisonai/ui/config/.chainlit/translations/mr.json +231 -0
  54. praisonai/ui/config/.chainlit/translations/ta.json +231 -0
  55. praisonai/ui/config/.chainlit/translations/te.json +231 -0
  56. praisonai/ui/config/.chainlit/translations/zh-CN.json +229 -0
  57. praisonai/ui/config/chainlit.md +1 -0
  58. praisonai/ui/config/translations/bn.json +231 -0
  59. praisonai/ui/config/translations/en-US.json +229 -0
  60. praisonai/ui/config/translations/gu.json +231 -0
  61. praisonai/ui/config/translations/he-IL.json +231 -0
  62. praisonai/ui/config/translations/hi.json +231 -0
  63. praisonai/ui/config/translations/kn.json +231 -0
  64. praisonai/ui/config/translations/ml.json +231 -0
  65. praisonai/ui/config/translations/mr.json +231 -0
  66. praisonai/ui/config/translations/ta.json +231 -0
  67. praisonai/ui/config/translations/te.json +231 -0
  68. praisonai/ui/config/translations/zh-CN.json +229 -0
  69. praisonai/ui/context.py +283 -0
  70. praisonai/ui/db.py +291 -0
  71. praisonai/ui/public/fantasy.svg +3 -0
  72. praisonai/ui/public/game.svg +3 -0
  73. praisonai/ui/public/logo_dark.png +0 -0
  74. praisonai/ui/public/logo_light.png +0 -0
  75. praisonai/ui/public/movie.svg +3 -0
  76. praisonai/ui/public/praison.css +3 -0
  77. praisonai/ui/public/thriller.svg +3 -0
  78. praisonai/ui/realtime.py +476 -0
  79. praisonai/ui/realtimeclient/__init__.py +653 -0
  80. praisonai/ui/realtimeclient/realtimedocs.txt +1484 -0
  81. praisonai/ui/realtimeclient/tools.py +236 -0
  82. praisonai/ui/sql_alchemy.py +707 -0
  83. praisonai/ui/tools.md +133 -0
  84. praisonai/version.py +1 -0
  85. praisonai-2.0.61.dist-info/LICENSE +20 -0
  86. praisonai-2.0.61.dist-info/METADATA +679 -0
  87. praisonai-2.0.61.dist-info/RECORD +89 -0
  88. praisonai-2.0.61.dist-info/WHEEL +4 -0
  89. praisonai-2.0.61.dist-info/entry_points.txt +5 -0
@@ -0,0 +1,1484 @@
1
+ Client events
2
+ Beta
3
+ These are events that the OpenAI Realtime WebSocket server will accept from the client.
4
+
5
+ Learn more about the Realtime API.
6
+
7
+ session.update
8
+ Beta
9
+ Send this event to update the session’s default configuration.
10
+
11
+ event_id
12
+ string
13
+
14
+ Optional client-generated ID used to identify this event.
15
+
16
+ type
17
+ string
18
+
19
+ The event type, must be "session.update".
20
+
21
+ session
22
+ object
23
+
24
+ Session configuration to update.
25
+
26
+
27
+ Show properties
28
+ session.update
29
+ {
30
+ "event_id": "event_123",
31
+ "type": "session.update",
32
+ "session": {
33
+ "modalities": ["text", "audio"],
34
+ "instructions": "Your knowledge cutoff is 2023-10. You are a helpful assistant.",
35
+ "voice": "alloy",
36
+ "input_audio_format": "pcm16",
37
+ "output_audio_format": "pcm16",
38
+ "input_audio_transcription": {
39
+ "enabled": true,
40
+ "model": "whisper-1"
41
+ },
42
+ "turn_detection": {
43
+ "type": "server_vad",
44
+ "threshold": 0.5,
45
+ "prefix_padding_ms": 300,
46
+ "silence_duration_ms": 200
47
+ },
48
+ "tools": [
49
+ {
50
+ "type": "function",
51
+ "name": "get_weather",
52
+ "description": "Get the current weather for a location.",
53
+ "parameters": {
54
+ "type": "object",
55
+ "properties": {
56
+ "location": { "type": "string" }
57
+ },
58
+ "required": ["location"]
59
+ }
60
+ }
61
+ ],
62
+ "tool_choice": "auto",
63
+ "temperature": 0.8,
64
+ "max_output_tokens": null
65
+ }
66
+ }
67
+ input_audio_buffer.append
68
+ Beta
69
+ Send this event to append audio bytes to the input audio buffer.
70
+
71
+ event_id
72
+ string
73
+
74
+ Optional client-generated ID used to identify this event.
75
+
76
+ type
77
+ string
78
+
79
+ The event type, must be "input_audio_buffer.append".
80
+
81
+ audio
82
+ string
83
+
84
+ Base64-encoded audio bytes.
85
+
86
+ input_audio_buffer.append
87
+ {
88
+ "event_id": "event_456",
89
+ "type": "input_audio_buffer.append",
90
+ "audio": "Base64EncodedAudioData"
91
+ }
92
+ input_audio_buffer.commit
93
+ Beta
94
+ Send this event to commit audio bytes to a user message.
95
+
96
+ event_id
97
+ string
98
+
99
+ Optional client-generated ID used to identify this event.
100
+
101
+ type
102
+ string
103
+
104
+ The event type, must be "input_audio_buffer.commit".
105
+
106
+ input_audio_buffer.commit
107
+ {
108
+ "event_id": "event_789",
109
+ "type": "input_audio_buffer.commit"
110
+ }
111
+ input_audio_buffer.clear
112
+ Beta
113
+ Send this event to clear the audio bytes in the buffer.
114
+
115
+ event_id
116
+ string
117
+
118
+ Optional client-generated ID used to identify this event.
119
+
120
+ type
121
+ string
122
+
123
+ The event type, must be "input_audio_buffer.clear".
124
+
125
+ input_audio_buffer.clear
126
+ {
127
+ "event_id": "event_012",
128
+ "type": "input_audio_buffer.clear"
129
+ }
130
+ conversation.item.create
131
+ Beta
132
+ Send this event when adding an item to the conversation.
133
+
134
+ event_id
135
+ string
136
+
137
+ Optional client-generated ID used to identify this event.
138
+
139
+ type
140
+ string
141
+
142
+ The event type, must be "conversation.item.create".
143
+
144
+ previous_item_id
145
+ string
146
+
147
+ The ID of the preceding item after which the new item will be inserted.
148
+
149
+ item
150
+ object
151
+
152
+ The item to add to the conversation.
153
+
154
+
155
+ Show properties
156
+ conversation.item.create
157
+ {
158
+ "event_id": "event_345",
159
+ "type": "conversation.item.create",
160
+ "previous_item_id": null,
161
+ "item": {
162
+ "id": "msg_001",
163
+ "type": "message",
164
+ "status": "completed",
165
+ "role": "user",
166
+ "content": [
167
+ {
168
+ "type": "input_text",
169
+ "text": "Hello, how are you?"
170
+ }
171
+ ]
172
+ }
173
+ }
174
+ conversation.item.truncate
175
+ Beta
176
+ Send this event when you want to truncate a previous assistant message’s audio.
177
+
178
+ event_id
179
+ string
180
+
181
+ Optional client-generated ID used to identify this event.
182
+
183
+ type
184
+ string
185
+
186
+ The event type, must be "conversation.item.truncate".
187
+
188
+ item_id
189
+ string
190
+
191
+ The ID of the assistant message item to truncate.
192
+
193
+ content_index
194
+ integer
195
+
196
+ The index of the content part to truncate.
197
+
198
+ audio_end_ms
199
+ integer
200
+
201
+ Inclusive duration up to which audio is truncated, in milliseconds.
202
+
203
+ conversation.item.truncate
204
+ {
205
+ "event_id": "event_678",
206
+ "type": "conversation.item.truncate",
207
+ "item_id": "msg_002",
208
+ "content_index": 0,
209
+ "audio_end_ms": 1500
210
+ }
211
+ conversation.item.delete
212
+ Beta
213
+ Send this event when you want to remove any item from the conversation history.
214
+
215
+ event_id
216
+ string
217
+
218
+ Optional client-generated ID used to identify this event.
219
+
220
+ type
221
+ string
222
+
223
+ The event type, must be "conversation.item.delete".
224
+
225
+ item_id
226
+ string
227
+
228
+ The ID of the item to delete.
229
+
230
+ conversation.item.delete
231
+ {
232
+ "event_id": "event_901",
233
+ "type": "conversation.item.delete",
234
+ "item_id": "msg_003"
235
+ }
236
+ response.create
237
+ Beta
238
+ Send this event to trigger a response generation.
239
+
240
+ event_id
241
+ string
242
+
243
+ Optional client-generated ID used to identify this event.
244
+
245
+ type
246
+ string
247
+
248
+ The event type, must be "response.create".
249
+
250
+ response
251
+ object
252
+
253
+ Configuration for the response.
254
+
255
+
256
+ Show properties
257
+ response.create
258
+ {
259
+ "event_id": "event_234",
260
+ "type": "response.create",
261
+ "response": {
262
+ "modalities": ["text", "audio"],
263
+ "instructions": "Please assist the user.",
264
+ "voice": "alloy",
265
+ "output_audio_format": "pcm16",
266
+ "tools": [
267
+ {
268
+ "type": "function",
269
+ "name": "calculate_sum",
270
+ "description": "Calculates the sum of two numbers.",
271
+ "parameters": {
272
+ "type": "object",
273
+ "properties": {
274
+ "a": { "type": "number" },
275
+ "b": { "type": "number" }
276
+ },
277
+ "required": ["a", "b"]
278
+ }
279
+ }
280
+ ],
281
+ "tool_choice": "auto",
282
+ "temperature": 0.7,
283
+ "max_output_tokens": 150
284
+ }
285
+ }
286
+ response.cancel
287
+ Beta
288
+ Send this event to cancel an in-progress response.
289
+
290
+ event_id
291
+ string
292
+
293
+ Optional client-generated ID used to identify this event.
294
+
295
+ type
296
+ string
297
+
298
+ The event type, must be "response.cancel".
299
+
300
+ response.cancel
301
+ {
302
+ "event_id": "event_567",
303
+ "type": "response.cancel"
304
+ }
305
+ Server events
306
+ Beta
307
+ These are events emitted from the OpenAI Realtime WebSocket server to the client.
308
+
309
+ Learn more about the Realtime API.
310
+
311
+ error
312
+ Beta
313
+ Returned when an error occurs.
314
+
315
+ event_id
316
+ string
317
+
318
+ The unique ID of the server event.
319
+
320
+ type
321
+ string
322
+
323
+ The event type, must be "error".
324
+
325
+ error
326
+ object
327
+
328
+ Details of the error.
329
+
330
+
331
+ Show properties
332
+ error
333
+ {
334
+ "event_id": "event_890",
335
+ "type": "error",
336
+ "error": {
337
+ "type": "invalid_request_error",
338
+ "code": "invalid_event",
339
+ "message": "The 'type' field is missing.",
340
+ "param": null,
341
+ "event_id": "event_567"
342
+ }
343
+ }
344
+ session.created
345
+ Beta
346
+ Returned when a session is created. Emitted automatically when a new connection is established.
347
+
348
+ event_id
349
+ string
350
+
351
+ The unique ID of the server event.
352
+
353
+ type
354
+ string
355
+
356
+ The event type, must be "session.created".
357
+
358
+ session
359
+ object
360
+
361
+ The session resource.
362
+
363
+
364
+ Show properties
365
+ session.created
366
+ {
367
+ "event_id": "event_1234",
368
+ "type": "session.created",
369
+ "session": {
370
+ "id": "sess_001",
371
+ "object": "realtime.session",
372
+ "model": "gpt-4o-realtime-preview-2024-10-01",
373
+ "modalities": ["text", "audio"],
374
+ "instructions": "",
375
+ "voice": "alloy",
376
+ "input_audio_format": "pcm16",
377
+ "output_audio_format": "pcm16",
378
+ "input_audio_transcription": null,
379
+ "turn_detection": {
380
+ "type": "server_vad",
381
+ "threshold": 0.5,
382
+ "prefix_padding_ms": 300,
383
+ "silence_duration_ms": 200
384
+ },
385
+ "tools": [],
386
+ "tool_choice": "auto",
387
+ "temperature": 0.8,
388
+ "max_output_tokens": null
389
+ }
390
+ }
391
+ session.updated
392
+ Beta
393
+ Returned when a session is updated.
394
+
395
+ event_id
396
+ string
397
+
398
+ The unique ID of the server event.
399
+
400
+ type
401
+ string
402
+
403
+ The event type, must be "session.updated".
404
+
405
+ session
406
+ object
407
+
408
+ The updated session resource.
409
+
410
+
411
+ Show properties
412
+ session.updated
413
+ {
414
+ "event_id": "event_5678",
415
+ "type": "session.updated",
416
+ "session": {
417
+ "id": "sess_001",
418
+ "object": "realtime.session",
419
+ "model": "gpt-4o-realtime-preview-2024-10-01",
420
+ "modalities": ["text"],
421
+ "instructions": "New instructions",
422
+ "voice": "alloy",
423
+ "input_audio_format": "pcm16",
424
+ "output_audio_format": "pcm16",
425
+ "input_audio_transcription": {
426
+ "enabled": true,
427
+ "model": "whisper-1"
428
+ },
429
+ "turn_detection": {
430
+ "type": "none"
431
+ },
432
+ "tools": [],
433
+ "tool_choice": "none",
434
+ "temperature": 0.7,
435
+ "max_output_tokens": 200
436
+ }
437
+ }
438
+ conversation.created
439
+ Beta
440
+ Returned when a conversation is created. Emitted right after session creation.
441
+
442
+ event_id
443
+ string
444
+
445
+ The unique ID of the server event.
446
+
447
+ type
448
+ string
449
+
450
+ The event type, must be "conversation.created".
451
+
452
+ conversation
453
+ object
454
+
455
+ The conversation resource.
456
+
457
+
458
+ Show properties
459
+ conversation.created
460
+ {
461
+ "event_id": "event_9101",
462
+ "type": "conversation.created",
463
+ "conversation": {
464
+ "id": "conv_001",
465
+ "object": "realtime.conversation"
466
+ }
467
+ }
468
+ input_audio_buffer.committed
469
+ Beta
470
+ Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode.
471
+
472
+ event_id
473
+ string
474
+
475
+ The unique ID of the server event.
476
+
477
+ type
478
+ string
479
+
480
+ The event type, must be "input_audio_buffer.committed".
481
+
482
+ previous_item_id
483
+ string
484
+
485
+ The ID of the preceding item after which the new item will be inserted.
486
+
487
+ item_id
488
+ string
489
+
490
+ The ID of the user message item that will be created.
491
+
492
+ input_audio_buffer.committed
493
+ {
494
+ "event_id": "event_1121",
495
+ "type": "input_audio_buffer.committed",
496
+ "previous_item_id": "msg_001",
497
+ "item_id": "msg_002"
498
+ }
499
+ input_audio_buffer.cleared
500
+ Beta
501
+ Returned when the input audio buffer is cleared by the client.
502
+
503
+ event_id
504
+ string
505
+
506
+ The unique ID of the server event.
507
+
508
+ type
509
+ string
510
+
511
+ The event type, must be "input_audio_buffer.cleared".
512
+
513
+ input_audio_buffer.cleared
514
+ {
515
+ "event_id": "event_1314",
516
+ "type": "input_audio_buffer.cleared"
517
+ }
518
+ input_audio_buffer.speech_started
519
+ Beta
520
+ Returned in server turn detection mode when speech is detected.
521
+
522
+ event_id
523
+ string
524
+
525
+ The unique ID of the server event.
526
+
527
+ type
528
+ string
529
+
530
+ The event type, must be "input_audio_buffer.speech_started".
531
+
532
+ audio_start_ms
533
+ integer
534
+
535
+ Milliseconds since the session started when speech was detected.
536
+
537
+ item_id
538
+ string
539
+
540
+ The ID of the user message item that will be created when speech stops.
541
+
542
+ input_audio_buffer.speech_started
543
+ {
544
+ "event_id": "event_1516",
545
+ "type": "input_audio_buffer.speech_started",
546
+ "audio_start_ms": 1000,
547
+ "item_id": "msg_003"
548
+ }
549
+ input_audio_buffer.speech_stopped
550
+ Beta
551
+ Returned in server turn detection mode when speech stops.
552
+
553
+ event_id
554
+ string
555
+
556
+ The unique ID of the server event.
557
+
558
+ type
559
+ string
560
+
561
+ The event type, must be "input_audio_buffer.speech_stopped".
562
+
563
+ audio_end_ms
564
+ integer
565
+
566
+ Milliseconds since the session started when speech stopped.
567
+
568
+ item_id
569
+ string
570
+
571
+ The ID of the user message item that will be created.
572
+
573
+ input_audio_buffer.speech_stopped
574
+ {
575
+ "event_id": "event_1718",
576
+ "type": "input_audio_buffer.speech_stopped",
577
+ "audio_end_ms": 2000,
578
+ "item_id": "msg_003"
579
+ }
580
+ conversation.item.created
581
+ Beta
582
+ Returned when a conversation item is created.
583
+
584
+ event_id
585
+ string
586
+
587
+ The unique ID of the server event.
588
+
589
+ type
590
+ string
591
+
592
+ The event type, must be "conversation.item.created".
593
+
594
+ previous_item_id
595
+ string
596
+
597
+ The ID of the preceding item.
598
+
599
+ item
600
+ object
601
+
602
+ The item that was created.
603
+
604
+
605
+ Show properties
606
+ conversation.item.created
607
+ {
608
+ "event_id": "event_1920",
609
+ "type": "conversation.item.created",
610
+ "previous_item_id": "msg_002",
611
+ "item": {
612
+ "id": "msg_003",
613
+ "object": "realtime.item",
614
+ "type": "message",
615
+ "status": "completed",
616
+ "role": "user",
617
+ "content": [
618
+ {
619
+ "type": "input_audio",
620
+ "transcript": null
621
+ }
622
+ ]
623
+ }
624
+ }
625
+ conversation.item.input_audio_transcription.completed
626
+ Beta
627
+ Returned when input audio transcription is enabled and a transcription succeeds.
628
+
629
+ event_id
630
+ string
631
+
632
+ The unique ID of the server event.
633
+
634
+ type
635
+ string
636
+
637
+ The event type, must be "conversation.item.input_audio_transcription.completed".
638
+
639
+ item_id
640
+ string
641
+
642
+ The ID of the user message item.
643
+
644
+ content_index
645
+ integer
646
+
647
+ The index of the content part containing the audio.
648
+
649
+ transcript
650
+ string
651
+
652
+ The transcribed text.
653
+
654
+ conversation.item.input_audio_transcription.completed
655
+ {
656
+ "event_id": "event_2122",
657
+ "type": "conversation.item.input_audio_transcription.completed",
658
+ "item_id": "msg_003",
659
+ "content_index": 0,
660
+ "transcript": "Hello, how are you?"
661
+ }
662
+ conversation.item.input_audio_transcription.failed
663
+ Beta
664
+ Returned when input audio transcription is configured, and a transcription request for a user message failed.
665
+
666
+ event_id
667
+ string
668
+
669
+ The unique ID of the server event.
670
+
671
+ type
672
+ string
673
+
674
+ The event type, must be "conversation.item.input_audio_transcription.failed".
675
+
676
+ item_id
677
+ string
678
+
679
+ The ID of the user message item.
680
+
681
+ content_index
682
+ integer
683
+
684
+ The index of the content part containing the audio.
685
+
686
+ error
687
+ object
688
+
689
+ Details of the transcription error.
690
+
691
+
692
+ Show properties
693
+ conversation.item.input_audio_transcription.failed
694
+ {
695
+ "event_id": "event_2324",
696
+ "type": "conversation.item.input_audio_transcription.failed",
697
+ "item_id": "msg_003",
698
+ "content_index": 0,
699
+ "error": {
700
+ "type": "transcription_error",
701
+ "code": "audio_unintelligible",
702
+ "message": "The audio could not be transcribed.",
703
+ "param": null
704
+ }
705
+ }
706
+ conversation.item.truncated
707
+ Beta
708
+ Returned when an earlier assistant audio message item is truncated by the client.
709
+
710
+ event_id
711
+ string
712
+
713
+ The unique ID of the server event.
714
+
715
+ type
716
+ string
717
+
718
+ The event type, must be "conversation.item.truncated".
719
+
720
+ item_id
721
+ string
722
+
723
+ The ID of the assistant message item that was truncated.
724
+
725
+ content_index
726
+ integer
727
+
728
+ The index of the content part that was truncated.
729
+
730
+ audio_end_ms
731
+ integer
732
+
733
+ The duration up to which the audio was truncated, in milliseconds.
734
+
735
+ conversation.item.truncated
736
+ {
737
+ "event_id": "event_2526",
738
+ "type": "conversation.item.truncated",
739
+ "item_id": "msg_004",
740
+ "content_index": 0,
741
+ "audio_end_ms": 1500
742
+ }
743
+ conversation.item.deleted
744
+ Beta
745
+ Returned when an item in the conversation is deleted.
746
+
747
+ event_id
748
+ string
749
+
750
+ The unique ID of the server event.
751
+
752
+ type
753
+ string
754
+
755
+ The event type, must be "conversation.item.deleted".
756
+
757
+ item_id
758
+ string
759
+
760
+ The ID of the item that was deleted.
761
+
762
+ conversation.item.deleted
763
+ {
764
+ "event_id": "event_2728",
765
+ "type": "conversation.item.deleted",
766
+ "item_id": "msg_005"
767
+ }
768
+ response.created
769
+ Beta
770
+ Returned when a new Response is created. The first event of response creation, where the response is in an initial state of "in_progress".
771
+
772
+ event_id
773
+ string
774
+
775
+ The unique ID of the server event.
776
+
777
+ type
778
+ string
779
+
780
+ The event type, must be "response.created".
781
+
782
+ response
783
+ object
784
+
785
+ The response resource.
786
+
787
+
788
+ Show properties
789
+ response.created
790
+ {
791
+ "event_id": "event_2930",
792
+ "type": "response.created",
793
+ "response": {
794
+ "id": "resp_001",
795
+ "object": "realtime.response",
796
+ "status": "in_progress",
797
+ "status_details": null,
798
+ "output": [],
799
+ "usage": null
800
+ }
801
+ }
802
+ response.done
803
+ Beta
804
+ Returned when a Response is done streaming. Always emitted, no matter the final state.
805
+
806
+ event_id
807
+ string
808
+
809
+ The unique ID of the server event.
810
+
811
+ type
812
+ string
813
+
814
+ The event type, must be "response.done".
815
+
816
+ response
817
+ object
818
+
819
+ The response resource.
820
+
821
+
822
+ Show properties
823
+ response.done
824
+ {
825
+ "event_id": "event_3132",
826
+ "type": "response.done",
827
+ "response": {
828
+ "id": "resp_001",
829
+ "object": "realtime.response",
830
+ "status": "completed",
831
+ "status_details": null,
832
+ "output": [
833
+ {
834
+ "id": "msg_006",
835
+ "object": "realtime.item",
836
+ "type": "message",
837
+ "status": "completed",
838
+ "role": "assistant",
839
+ "content": [
840
+ {
841
+ "type": "text",
842
+ "text": "Sure, how can I assist you today?"
843
+ }
844
+ ]
845
+ }
846
+ ],
847
+ "usage": {
848
+ "total_tokens": 50,
849
+ "input_tokens": 20,
850
+ "output_tokens": 30
851
+ }
852
+ }
853
+ }
854
+ response.output_item.added
855
+ Beta
856
+ Returned when a new Item is created during response generation.
857
+
858
+ event_id
859
+ string
860
+
861
+ The unique ID of the server event.
862
+
863
+ type
864
+ string
865
+
866
+ The event type, must be "response.output_item.added".
867
+
868
+ response_id
869
+ string
870
+
871
+ The ID of the response to which the item belongs.
872
+
873
+ output_index
874
+ integer
875
+
876
+ The index of the output item in the response.
877
+
878
+ item
879
+ object
880
+
881
+ The item that was added.
882
+
883
+
884
+ Show properties
885
+ response.output_item.added
886
+ {
887
+ "event_id": "event_3334",
888
+ "type": "response.output_item.added",
889
+ "response_id": "resp_001",
890
+ "output_index": 0,
891
+ "item": {
892
+ "id": "msg_007",
893
+ "object": "realtime.item",
894
+ "type": "message",
895
+ "status": "in_progress",
896
+ "role": "assistant",
897
+ "content": []
898
+ }
899
+ }
900
+ response.output_item.done
901
+ Beta
902
+ Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
903
+
904
+ event_id
905
+ string
906
+
907
+ The unique ID of the server event.
908
+
909
+ type
910
+ string
911
+
912
+ The event type, must be "response.output_item.done".
913
+
914
+ response_id
915
+ string
916
+
917
+ The ID of the response to which the item belongs.
918
+
919
+ output_index
920
+ integer
921
+
922
+ The index of the output item in the response.
923
+
924
+ item
925
+ object
926
+
927
+ The completed item.
928
+
929
+
930
+ Show properties
931
+ response.output_item.done
932
+ {
933
+ "event_id": "event_3536",
934
+ "type": "response.output_item.done",
935
+ "response_id": "resp_001",
936
+ "output_index": 0,
937
+ "item": {
938
+ "id": "msg_007",
939
+ "object": "realtime.item",
940
+ "type": "message",
941
+ "status": "completed",
942
+ "role": "assistant",
943
+ "content": [
944
+ {
945
+ "type": "text",
946
+ "text": "Sure, I can help with that."
947
+ }
948
+ ]
949
+ }
950
+ }
951
+ response.content_part.added
952
+ Beta
953
+ Returned when a new content part is added to an assistant message item during response generation.
954
+
955
+ event_id
956
+ string
957
+
958
+ The unique ID of the server event.
959
+
960
+ type
961
+ string
962
+
963
+ The event type, must be "response.content_part.added".
964
+
965
+ response_id
966
+ string
967
+
968
+ The ID of the response.
969
+
970
+ item_id
971
+ string
972
+
973
+ The ID of the item to which the content part was added.
974
+
975
+ output_index
976
+ integer
977
+
978
+ The index of the output item in the response.
979
+
980
+ content_index
981
+ integer
982
+
983
+ The index of the content part in the item's content array.
984
+
985
+ part
986
+ object
987
+
988
+ The content part that was added.
989
+
990
+
991
+ Show properties
992
+ response.content_part.added
993
+ {
994
+ "event_id": "event_3738",
995
+ "type": "response.content_part.added",
996
+ "response_id": "resp_001",
997
+ "item_id": "msg_007",
998
+ "output_index": 0,
999
+ "content_index": 0,
1000
+ "part": {
1001
+ "type": "text",
1002
+ "text": ""
1003
+ }
1004
+ }
1005
+ response.content_part.done
1006
+ Beta
1007
+ Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled.
1008
+
1009
+ event_id
1010
+ string
1011
+
1012
+ The unique ID of the server event.
1013
+
1014
+ type
1015
+ string
1016
+
1017
+ The event type, must be "response.content_part.done".
1018
+
1019
+ response_id
1020
+ string
1021
+
1022
+ The ID of the response.
1023
+
1024
+ item_id
1025
+ string
1026
+
1027
+ The ID of the item.
1028
+
1029
+ output_index
1030
+ integer
1031
+
1032
+ The index of the output item in the response.
1033
+
1034
+ content_index
1035
+ integer
1036
+
1037
+ The index of the content part in the item's content array.
1038
+
1039
+ part
1040
+ object
1041
+
1042
+ The content part that is done.
1043
+
1044
+
1045
+ Show properties
1046
+ response.content_part.done
1047
+ {
1048
+ "event_id": "event_3940",
1049
+ "type": "response.content_part.done",
1050
+ "response_id": "resp_001",
1051
+ "item_id": "msg_007",
1052
+ "output_index": 0,
1053
+ "content_index": 0,
1054
+ "part": {
1055
+ "type": "text",
1056
+ "text": "Sure, I can help with that."
1057
+ }
1058
+ }
1059
+ response.text.delta
1060
+ Beta
1061
+ Returned when the text value of a "text" content part is updated.
1062
+
1063
+ event_id
1064
+ string
1065
+
1066
+ The unique ID of the server event.
1067
+
1068
+ type
1069
+ string
1070
+
1071
+ The event type, must be "response.text.delta".
1072
+
1073
+ response_id
1074
+ string
1075
+
1076
+ The ID of the response.
1077
+
1078
+ item_id
1079
+ string
1080
+
1081
+ The ID of the item.
1082
+
1083
+ output_index
1084
+ integer
1085
+
1086
+ The index of the output item in the response.
1087
+
1088
+ content_index
1089
+ integer
1090
+
1091
+ The index of the content part in the item's content array.
1092
+
1093
+ delta
1094
+ string
1095
+
1096
+ The text delta.
1097
+
1098
+ response.text.delta
1099
+ {
1100
+ "event_id": "event_4142",
1101
+ "type": "response.text.delta",
1102
+ "response_id": "resp_001",
1103
+ "item_id": "msg_007",
1104
+ "output_index": 0,
1105
+ "content_index": 0,
1106
+ "delta": "Sure, I can h"
1107
+ }
1108
+ response.text.done
1109
+ Beta
1110
+ Returned when the text value of a "text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
1111
+
1112
+ event_id
1113
+ string
1114
+
1115
+ The unique ID of the server event.
1116
+
1117
+ type
1118
+ string
1119
+
1120
+ The event type, must be "response.text.done".
1121
+
1122
+ response_id
1123
+ string
1124
+
1125
+ The ID of the response.
1126
+
1127
+ item_id
1128
+ string
1129
+
1130
+ The ID of the item.
1131
+
1132
+ output_index
1133
+ integer
1134
+
1135
+ The index of the output item in the response.
1136
+
1137
+ content_index
1138
+ integer
1139
+
1140
+ The index of the content part in the item's content array.
1141
+
1142
+ text
1143
+ string
1144
+
1145
+ The final text content.
1146
+
1147
+ response.text.done
1148
+ {
1149
+ "event_id": "event_4344",
1150
+ "type": "response.text.done",
1151
+ "response_id": "resp_001",
1152
+ "item_id": "msg_007",
1153
+ "output_index": 0,
1154
+ "content_index": 0,
1155
+ "text": "Sure, I can help with that."
1156
+ }
1157
+ response.audio_transcript.delta
1158
+ Beta
1159
+ Returned when the model-generated transcription of audio output is updated.
1160
+
1161
+ event_id
1162
+ string
1163
+
1164
+ The unique ID of the server event.
1165
+
1166
+ type
1167
+ string
1168
+
1169
+ The event type, must be "response.audio_transcript.delta".
1170
+
1171
+ response_id
1172
+ string
1173
+
1174
+ The ID of the response.
1175
+
1176
+ item_id
1177
+ string
1178
+
1179
+ The ID of the item.
1180
+
1181
+ output_index
1182
+ integer
1183
+
1184
+ The index of the output item in the response.
1185
+
1186
+ content_index
1187
+ integer
1188
+
1189
+ The index of the content part in the item's content array.
1190
+
1191
+ delta
1192
+ string
1193
+
1194
+ The transcript delta.
1195
+
1196
+ response.audio_transcript.delta
1197
+ {
1198
+ "event_id": "event_4546",
1199
+ "type": "response.audio_transcript.delta",
1200
+ "response_id": "resp_001",
1201
+ "item_id": "msg_008",
1202
+ "output_index": 0,
1203
+ "content_index": 0,
1204
+ "delta": "Hello, how can I a"
1205
+ }
1206
+ response.audio_transcript.done
1207
+ Beta
1208
+ Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
1209
+
1210
+ event_id
1211
+ string
1212
+
1213
+ The unique ID of the server event.
1214
+
1215
+ type
1216
+ string
1217
+
1218
+ The event type, must be "response.audio_transcript.done".
1219
+
1220
+ response_id
1221
+ string
1222
+
1223
+ The ID of the response.
1224
+
1225
+ item_id
1226
+ string
1227
+
1228
+ The ID of the item.
1229
+
1230
+ output_index
1231
+ integer
1232
+
1233
+ The index of the output item in the response.
1234
+
1235
+ content_index
1236
+ integer
1237
+
1238
+ The index of the content part in the item's content array.
1239
+
1240
+ transcript
1241
+ string
1242
+
1243
+ The final transcript of the audio.
1244
+
1245
+ response.audio_transcript.done
1246
+ {
1247
+ "event_id": "event_4748",
1248
+ "type": "response.audio_transcript.done",
1249
+ "response_id": "resp_001",
1250
+ "item_id": "msg_008",
1251
+ "output_index": 0,
1252
+ "content_index": 0,
1253
+ "transcript": "Hello, how can I assist you today?"
1254
+ }
1255
+ response.audio.delta
1256
+ Beta
1257
+ Returned when the model-generated audio is updated.
1258
+
1259
+ event_id
1260
+ string
1261
+
1262
+ The unique ID of the server event.
1263
+
1264
+ type
1265
+ string
1266
+
1267
+ The event type, must be "response.audio.delta".
1268
+
1269
+ response_id
1270
+ string
1271
+
1272
+ The ID of the response.
1273
+
1274
+ item_id
1275
+ string
1276
+
1277
+ The ID of the item.
1278
+
1279
+ output_index
1280
+ integer
1281
+
1282
+ The index of the output item in the response.
1283
+
1284
+ content_index
1285
+ integer
1286
+
1287
+ The index of the content part in the item's content array.
1288
+
1289
+ delta
1290
+ string
1291
+
1292
+ Base64-encoded audio data delta.
1293
+
1294
+ response.audio.delta
1295
+ {
1296
+ "event_id": "event_4950",
1297
+ "type": "response.audio.delta",
1298
+ "response_id": "resp_001",
1299
+ "item_id": "msg_008",
1300
+ "output_index": 0,
1301
+ "content_index": 0,
1302
+ "delta": "Base64EncodedAudioDelta"
1303
+ }
1304
+ response.audio.done
1305
+ Beta
1306
+ Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled.
1307
+
1308
+ event_id
1309
+ string
1310
+
1311
+ The unique ID of the server event.
1312
+
1313
+ type
1314
+ string
1315
+
1316
+ The event type, must be "response.audio.done".
1317
+
1318
+ response_id
1319
+ string
1320
+
1321
+ The ID of the response.
1322
+
1323
+ item_id
1324
+ string
1325
+
1326
+ The ID of the item.
1327
+
1328
+ output_index
1329
+ integer
1330
+
1331
+ The index of the output item in the response.
1332
+
1333
+ content_index
1334
+ integer
1335
+
1336
+ The index of the content part in the item's content array.
1337
+
1338
+ response.audio.done
1339
+ {
1340
+ "event_id": "event_5152",
1341
+ "type": "response.audio.done",
1342
+ "response_id": "resp_001",
1343
+ "item_id": "msg_008",
1344
+ "output_index": 0,
1345
+ "content_index": 0
1346
+ }
1347
+ response.function_call_arguments.delta
1348
+ Beta
1349
+ Returned when the model-generated function call arguments are updated.
1350
+
1351
+ event_id
1352
+ string
1353
+
1354
+ The unique ID of the server event.
1355
+
1356
+ type
1357
+ string
1358
+
1359
+ The event type, must be "response.function_call_arguments.delta".
1360
+
1361
+ response_id
1362
+ string
1363
+
1364
+ The ID of the response.
1365
+
1366
+ item_id
1367
+ string
1368
+
1369
+ The ID of the function call item.
1370
+
1371
+ output_index
1372
+ integer
1373
+
1374
+ The index of the output item in the response.
1375
+
1376
+ call_id
1377
+ string
1378
+
1379
+ The ID of the function call.
1380
+
1381
+ delta
1382
+ string
1383
+
1384
+ The arguments delta as a JSON string.
1385
+
1386
+ response.function_call_arguments.delta
1387
+ {
1388
+ "event_id": "event_5354",
1389
+ "type": "response.function_call_arguments.delta",
1390
+ "response_id": "resp_002",
1391
+ "item_id": "fc_001",
1392
+ "output_index": 0,
1393
+ "call_id": "call_001",
1394
+ "delta": "{\"location\": \"San\""
1395
+ }
1396
+ response.function_call_arguments.done
1397
+ Beta
1398
+ Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.
1399
+
1400
+ event_id
1401
+ string
1402
+
1403
+ The unique ID of the server event.
1404
+
1405
+ type
1406
+ string
1407
+
1408
+ The event type, must be "response.function_call_arguments.done".
1409
+
1410
+ response_id
1411
+ string
1412
+
1413
+ The ID of the response.
1414
+
1415
+ item_id
1416
+ string
1417
+
1418
+ The ID of the function call item.
1419
+
1420
+ output_index
1421
+ integer
1422
+
1423
+ The index of the output item in the response.
1424
+
1425
+ call_id
1426
+ string
1427
+
1428
+ The ID of the function call.
1429
+
1430
+ arguments
1431
+ string
1432
+
1433
+ The final arguments as a JSON string.
1434
+
1435
+ response.function_call_arguments.done
1436
+ {
1437
+ "event_id": "event_5556",
1438
+ "type": "response.function_call_arguments.done",
1439
+ "response_id": "resp_002",
1440
+ "item_id": "fc_001",
1441
+ "output_index": 0,
1442
+ "call_id": "call_001",
1443
+ "arguments": "{\"location\": \"San Francisco\"}"
1444
+ }
1445
+ rate_limits.updated
1446
+ Beta
1447
+ Emitted after every "response.done" event to indicate the updated rate limits.
1448
+
1449
+ event_id
1450
+ string
1451
+
1452
+ The unique ID of the server event.
1453
+
1454
+ type
1455
+ string
1456
+
1457
+ The event type, must be "rate_limits.updated".
1458
+
1459
+ rate_limits
1460
+ array
1461
+
1462
+ List of rate limit information.
1463
+
1464
+
1465
+ Show properties
1466
+ rate_limits.updated
1467
+ {
1468
+ "event_id": "event_5758",
1469
+ "type": "rate_limits.updated",
1470
+ "rate_limits": [
1471
+ {
1472
+ "name": "requests",
1473
+ "limit": 1000,
1474
+ "remaining": 999,
1475
+ "reset_seconds": 60
1476
+ },
1477
+ {
1478
+ "name": "tokens",
1479
+ "limit": 50000,
1480
+ "remaining": 49950,
1481
+ "reset_seconds": 60
1482
+ }
1483
+ ]
1484
+ }