Skip to content
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

Python: Allow function calling stepwise planner to use AzureOpenAI chat service #5618

Merged
merged 5 commits into from
Mar 25, 2024

Conversation

moonbox3
Copy link
Contributor

Motivation and Context

The first iteration of the function calling stepwise planner only used OpenAI. Now allow AzureChatService to use the planner.

Description

This PR:

  • Allows the use of AzureOpenAI for the FC Stepwise Planner
  • Fixes some formatting issues when generating the names/metadata of Plugins. .NET gets the function metadata as JSON, and the Azure Model performs much better with it formatted like this.
  • Fix some missing spaces in the constant message used in the planner -- Azure is treating the new lines in that const message incorrectly and it causes content filtering results (reaching out to the team to understand why this is).

Contribution Checklist

…ce. Fix some formatting issues when generating the plan.
@moonbox3 moonbox3 requested a review from a team as a code owner March 22, 2024 23:13
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Mar 22, 2024
@github-actions github-actions bot changed the title Allow function calling stepwise planner to use AzureOpenAI chat service Python: Allow function calling stepwise planner to use AzureOpenAI chat service Mar 22, 2024
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Mar 22, 2024

Py3.8 Test Coverage

Python 3.8 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/core_plugins
   time_plugin.py84693%61, 71–72, 181–182, 231
semantic_kernel/planners/function_calling_stepwise_planner
   function_calling_stepwise_planner.py943662%113–171, 202–207
TOTAL5370102081% 

Python 3.8 Unit Test Overview

Tests Skipped Failures Errors Time
1190 11 💤 0 ❌ 0 🔥 20.948s ⏱️

Copy link
Contributor

@juliomenendez juliomenendez left a comment

Choose a reason for hiding this comment

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

Looks good, just one small extra import that I think is not needed

python/semantic_kernel/planners/planner_extensions.py Outdated Show resolved Hide resolved
@moonbox3 moonbox3 enabled auto-merge March 25, 2024 13:17
@moonbox3 moonbox3 added this pull request to the merge queue Mar 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 25, 2024
@moonbox3 moonbox3 added this pull request to the merge queue Mar 25, 2024
Merged via the queue into microsoft:main with commit 84a75ec Mar 25, 2024
30 checks passed
@moonbox3 moonbox3 deleted the improve_func_call_stepwise_planner branch March 25, 2024 13:42
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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants