Python: support (Azure) OpenAI realtime audio models
Motivation and Context
SK has support for realtime-preview models; however, since they've gone to GA we have not added support for the latest library abstractions. This PR brings in the changes to support running models like gpt-realtime, gpt-realtime-mini or gpt-audio.
Description
- Closes #13267
- Code now relies on
openai>= 2.0 - Considered a breaking change due some new config added to the execution settings.
Contribution Checklist
- [X] The code builds clean without any errors or warnings
- [X] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone :smile:
Python Test Coverage Report •
File Stmts Miss Cover Missing connectors/ai/open_ai/prompt_execution_settings open_ai_realtime_execution_settings.py 52 7 86% 99, 103, 107, 111, 115, 119, 123 connectors/ai/open_ai/services _open_ai_realtime.py 457 101 77% 288, 290, 292, 316, 378, 386, 430–434, 458–461, 552–553, 556–557, 567, 575–578, 585, 587, 590–591, 641–644, 653–656, 668–669, 713–715, 717–718, 721–722, 725, 736, 739, 741–743, 745–747, 786–787, 794–796, 815, 822, 827–829, 831–834, 841–843, 851–852, 856–860, 873–874, 879–881, 913, 916, 919–922, 927–929, 932–935, 937–941 azure_realtime.py 61 29 52% 104–105, 115–119, 140, 212–213, 223–230, 250, 255, 259–260, 267, 278–283 connectors/ai/open_ai/settings open_ai_settings.py 15 0 100% TOTAL 27331 4580 83%
Python Unit Test Overview
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 3759 | 23 :zzz: | 0 :x: | 0 :fire: | 1m 39s :stopwatch: |