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

.Net: Simplify chatgpt plugin import method names #2007

Merged
merged 50 commits into from
Aug 4, 2023

Conversation

craigomatic
Copy link
Contributor

@craigomatic craigomatic commented Jul 15, 2023

Description

Several extension methods were previously supplied that allow loading plugins from remote URI, local files, streams and from a given directory. They also were specific to OpenAPI and ChatGPT.

This PR marks those extensions as Obsolete (KernelChatGptPluginExtensions.cs and KernelOpenApiExtensions.cs) and supplies a single ImportAIPluginAsync in a new extension file which expects a URI or a Stream to import from. For resources of any other form, the caller is expected to carry the burden of getting them to a stream or a URI.

A single integration test has been added that imports the Klarna AI Plugin using both it's ChatGPT representation (https://www.klarna.com/.well-known/ai-plugin.json) and the OpenAPI representation (https://www.klarna.com/us/shopping/public/openai/v0/api-docs/)

Contribution Checklist

@craigomatic craigomatic added the PR: in progress Under development and/or addressing feedback label Jul 15, 2023
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Jul 15, 2023
@shawncal shawncal changed the title Simplify chatgpt plugin import method names .Net: Simplify chatgpt plugin import method names Jul 15, 2023
@craigomatic craigomatic marked this pull request as ready for review July 18, 2023 10:56
@craigomatic craigomatic requested a review from a team as a code owner July 18, 2023 10:56
@craigomatic craigomatic added PR: ready for review All feedback addressed, ready for reviews and removed PR: in progress Under development and/or addressing feedback labels Jul 19, 2023
@craigomatic craigomatic added the PR: ready to merge PR has been approved by all reviewers, and is ready to merge. label Aug 3, 2023
@hathind-ms hathind-ms added this pull request to the merge queue Aug 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 3, 2023
@shawncal shawncal added this pull request to the merge queue Aug 4, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 4, 2023
@shawncal shawncal enabled auto-merge August 4, 2023 02:56
@shawncal shawncal added this pull request to the merge queue Aug 4, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 4, 2023
@shawncal shawncal enabled auto-merge August 4, 2023 03:11
@shawncal shawncal added this pull request to the merge queue Aug 4, 2023
Merged via the queue into microsoft:main with commit 66b8867 Aug 4, 2023
13 checks passed
@craigomatic craigomatic deleted the chatgpt-plugin-cleanup branch August 4, 2023 03:20
SOE-YoungS pushed a commit to SOE-YoungS/semantic-kernel that referenced this pull request Nov 1, 2023
### Description
Several extension methods were previously supplied that allow loading
plugins from remote URI, local files, streams and from a given
directory. They also were specific to OpenAPI and ChatGPT.

This PR marks those extensions as Obsolete
(KernelChatGptPluginExtensions.cs and KernelOpenApiExtensions.cs) and
supplies a single `ImportAIPluginAsync` in a new extension file which
expects a URI or a Stream to import from. For resources of any other
form, the caller is expected to carry the burden of getting them to a
stream or a URI.

A single integration test has been added that imports the Klarna AI
Plugin using both it's ChatGPT representation
(https://www.klarna.com/.well-known/ai-plugin.json) and the OpenAPI
representation
(https://www.klarna.com/us/shopping/public/openai/v0/api-docs/)

### 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#dev-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Craig Presti <craig.presti@microsoft.com>
Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: ready to merge PR has been approved by all reviewers, and is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants