Skip to content

.Net: Issue 11562 (add plugin description) #11601

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

Conversation

AleRoe
Copy link
Contributor

@AleRoe AleRoe commented Apr 16, 2025

Motivation and Context

The current ApiManifestKernelExtensions implementations (ImportPluginFromApiManifestAsync and CreatePluginFromApiManifestAsync) in Microsoft.SemanticKernel.Plugins.OpenApi.Extensions lack the capability to provide a description for the newly created KernelPlugin. Plugins should have a description to provide adequate context to the LLM regarding their purpose and use.

Ideally, the description is derived from the ApiManifestDocument, but the current Microsoft.OpenApi.ApiManifest.ApiManifestDocument implementation does not support a Description property.

This PR addresses issue #11562

Description

To get around this limitation, I've modified the CreatePluginFromApiManifestAsync implementation to accept a description parameter which is passed to the KernelPluginFactory.CreateFromFunctions() call and added two new method signatures to ensure backwards compatibility.
I've also added a new testclass (ApiManifestKernelExtensionsTests.cs) and apimanifest.json sample (which was missing so far) in SemanticKernel.Functions.UnitTests.

Contribution Checklist

AleRoe added 2 commits April 16, 2025 21:14
…ameter which is passed to the KernelPluginFactory.CreateFromFunctions method.

Added new method overloads for CreatePluginFromApiManifestAsync and ImportPluginFromApiManifestAsync to maintain API signature and behavioral compatibility.
@AleRoe AleRoe requested a review from a team as a code owner April 16, 2025 20:02
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label Apr 16, 2025
@github-actions github-actions bot changed the title Issue 11562 (add plugin description) .Net: Issue 11562 (add plugin description) Apr 16, 2025
@AleRoe
Copy link
Contributor Author

AleRoe commented Apr 16, 2025

@microsoft-github-policy-service agree

@markwallace-microsoft markwallace-microsoft added this pull request to the merge queue Apr 17, 2025
Merged via the queue into microsoft:main with commit cc2b70f Apr 17, 2025
20 checks passed
@AleRoe AleRoe deleted the Issue-11562-(add-plugin-description) branch April 18, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants