Skip to content

Python: Azure AI Inference Function Calling #7035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

TaoChenOSU
Copy link
Contributor

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

  1. Add function calling to Azure AI Inference.

Contribution Checklist

@TaoChenOSU TaoChenOSU requested a review from a team as a code owner July 1, 2024 22:27
@TaoChenOSU TaoChenOSU self-assigned this Jul 1, 2024
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Jul 1, 2024
@github-actions github-actions bot changed the title Azure AI Inference Function Calling Python: Azure AI Inference Function Calling Jul 1, 2024
@TaoChenOSU TaoChenOSU linked an issue Jul 1, 2024 that may be closed by this pull request
Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jul 2, 2024

Py3.10 Test Coverage

Python 3.10 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/connectors/ai
   function_calling_utils.py10370%16–22
semantic_kernel/connectors/ai/azure_ai_inference/services
   azure_ai_inference_chat_completion.py1417646%133–159, 187–206, 233–244, 253–289, 295–306, 326–348, 370–373, 402–411, 419, 434–436, 454
   utils.py402342%39, 57–71, 83–102, 114–127
semantic_kernel/connectors/ai/open_ai/services
   open_ai_chat_completion_base.py1687058%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
TOTAL680463391% 

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1679 1 💤 0 ❌ 0 🔥 27.797s ⏱️

@TaoChenOSU TaoChenOSU enabled auto-merge July 5, 2024 23:42
Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth the effort to go already do a mypy and test coverage check on this!

@TaoChenOSU
Copy link
Contributor Author

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

@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jul 9, 2024
Merged via the queue into microsoft:main with commit 0ad7f54 Jul 9, 2024
23 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/python-maas-function-calling branch July 9, 2024 16:42
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 2024
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
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

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Add function calling to Azure AI Inference.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Python: Add AI connector for Azure MaaS (Including ADR)
5 participants