Python: Azure AI Inference Function Calling
Motivation and Context
Now that the Function Choice abstraction has been implemented in Python, it is time to extend this feature to other connectors. The first (OAI and AOAI are not included) connector to be granted this honor is the Azure AI Inference connector.
Description
- Add function calling to Azure AI Inference.
Contribution Checklist
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone :smile:
Python 3.10 Test Coverage Report •
File Stmts Miss Cover Missing semantic_kernel/connectors/ai function_calling_utils.py 10 3 70% 16–22 semantic_kernel/connectors/ai/azure_ai_inference/services azure_ai_inference_chat_completion.py 141 76 46% 133–159, 187–206, 233–244, 253–289, 295–306, 326–348, 370–373, 402–411, 419, 434–436, 454 utils.py 40 23 42% 39, 57–71, 83–102, 114–127 semantic_kernel/connectors/ai/open_ai/services open_ai_chat_completion_base.py 168 70 58% 93, 97, 117, 142–146, 171, 179, 181, 185, 203–208, 226–254, 257–268, 283–290, 301–309, 325–332, 353, 361, 367–370, 382–385, 416 TOTAL 6804 633 91%
Python 3.10 Unit Test Overview
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 1679 | 1 :zzz: | 0 :x: | 0 :fire: | 27.797s :stopwatch: |
might be worth the effort to go already do a mypy and test coverage check on this!
Will do it after my current Ollama work