Skip to content

Commit

Permalink
Python: Remove OpenAI plugin. Update OpenAPI exec params to use direc…
Browse files Browse the repository at this point in the history
…t predicate reference (#10095)

### 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).

<!-- 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.
-->

### 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.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

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

- [X] The code builds clean without any errors or warnings
- [X] 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
- [X] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
  • Loading branch information
moonbox3 authored Jan 7, 2025
1 parent 5e4012f commit d55c05d
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 770 deletions.
295 changes: 0 additions & 295 deletions python/samples/concepts/plugins/openai_plugin_azure_key_vault.py

This file was deleted.

31 changes: 0 additions & 31 deletions python/samples/concepts/plugins/openai_plugin_klarna.py

This file was deleted.

17 changes: 0 additions & 17 deletions python/semantic_kernel/connectors/openai_plugin/__init__.py

This file was deleted.

This file was deleted.

Loading

0 comments on commit d55c05d

Please sign in to comment.