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: Remove OpenAI plugin. Update OpenAPI exec params to use direct predicate reference #10095

Merged
merged 9 commits into from
Jan 7, 2025

Conversation

moonbox3
Copy link
Contributor

@moonbox3 moonbox3 commented Jan 6, 2025

Motivation and Context

Dotnet had long removed the OpenAI plugin from its code base, and Python did not follow at the time. We had previously provided deprecation messages around using the OpenAI plugin and to switch to the OpenAPI plugin. We are now removing the OpenAI plugin from the SK Python SDK.

Additionally, there was a forward reference created without specifying the direct predicate context reference in the OpenAPIFunctionExecutionParameters. This put the burden on the dev to have to perform a model rebuild once the import was added. This PR cleans up the OperationSelectionPredicateContext import, which is now direct and via the sub-module and not via the parent module, which causes the init.py to load all dependencies (which is unnecessary).

Description

This PR:

  • removes the unsupported OpenAI plugin (previously marked as deprecated)
  • fixes the OperationSelectionPredicateContext import to allow a user to create the func exec params without receiving a pydantic error.
  • updates unit tests to remove references to OpenAI plugin.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner January 6, 2025 23:27
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Jan 6, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 6, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/connectors/openapi_plugin
   openapi_manager.py80890%54, 71, 93–96, 141–142
   openapi_parser.py121794%67, 124, 188, 250–251, 254–255
semantic_kernel/functions
   kernel_plugin.py172597%392, 395, 424, 445, 470
TOTAL16645176989% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2991 4 💤 0 ❌ 0 🔥 1m 27s ⏱️

@TaoChenOSU
Copy link
Contributor

Question: This is a breaking change since we are removing features. Are we ok with breaking changes now?

@moonbox3
Copy link
Contributor Author

moonbox3 commented Jan 7, 2025

Question: This is a breaking change since we are removing features. Are we ok with breaking changes now?

Valid question, but I would say yes because of two reasons:

  1. OpenAI deprecated the OpenAI plugin, so there is no need for us to support it.
  2. SK C# deprecated/removed this OpenAI plugin last March/April (of 2024), and we should have done it at the same time, but didn't.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 7, 2025
@alliscode alliscode added this pull request to the merge queue Jan 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 7, 2025
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 7, 2025
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 7, 2025
@moonbox3 moonbox3 enabled auto-merge January 7, 2025 21:36
@moonbox3 moonbox3 self-assigned this Jan 7, 2025
@moonbox3 moonbox3 added this pull request to the merge queue Jan 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 7, 2025
@moonbox3 moonbox3 added this pull request to the merge queue Jan 7, 2025
Merged via the queue into microsoft:main with commit 0d8e3fd Jan 7, 2025
25 checks passed
@moonbox3 moonbox3 deleted the py-openapi-param-fix branch January 7, 2025 22:03
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
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

5 participants