You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: Feature request
about: Suggest an idea for this project
When creating a new plugin using either the CreatePluginFromApiManifestAsync or ImportPluginFromApiManifestAsync, from the Microsoft.SemanticKernel.Plugins.OpenApi.Extensions package, there's no way to set the Description property of the KernelPlugin (which is readonly). The description property is needed though to give SK the needed context as to what the plugin does.
There are two options:
extract the description from the apimanifest file
provide overloads for the extension methods to pass the description
Option 1)
This would be the ideal solution. But currently, the Microsoft.OpenApi.ApiManifest.ApiManifestDocument class does not support a Description value and would have to be extended. I'm not sure if the official spec actually intends to support that or not, but I have seen Microsoft samples that do include a description value.
Option 2)
Add an optional parameter to the method:
/// <summary>
/// Creates a kernel plugin from an API manifest file asynchronously.
/// </summary>
/// <param name="kernel">The kernel instance.</param>
/// <param name="pluginName">The name of the plugin.</param>
/// <param name="filePath">The file path of the API manifest.</param>
/// <param name="description">The derscription of the plugin.</param>
/// <param name="pluginParameters">Optional parameters for the plugin setup.</param>
/// <param name="cancellationToken">Optional cancellation token.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the created kernel plugin.</returns>
public static async Task<KernelPlugin> CreatePluginFromApiManifestAsync(
this Kernel kernel,
string pluginName,
string filePath,
string? description = null,
ApiManifestPluginParameters? pluginParameters = null,
CancellationToken cancellationToken = default)
and then add the value when creating the KernelPlugin: return KernelPluginFactory.CreateFromFunctions(pluginName, description, functions);
(Same would apply to ImportPluginFromApiManifestAsync)
Option 2) is really a very easy fix and I would really appreciate if that could be added.
Thanks
Alexander
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
New Feature: Support adding Plugin-Description when creating plugin from apimanifest
.Net: New Feature: Support adding Plugin-Description when creating plugin from apimanifest
Apr 15, 2025
Hi @markwallace-microsoft,
I'm more than happy to contribute!
Can you confirm that Microsoft.OpenApi.ApiManifest.ApiManifestDocument is intended to support a Description property?
Update: Option 2) has been implemented with Release 1.47.
I will leave this issue open as implmenting Option 1) is still open depending on support from microsoft/openapi/apimanifest
name: Feature request
about: Suggest an idea for this project
When creating a new plugin using either the
CreatePluginFromApiManifestAsync
orImportPluginFromApiManifestAsync
, from the Microsoft.SemanticKernel.Plugins.OpenApi.Extensions package, there's no way to set the Description property of the KernelPlugin (which is readonly). The description property is needed though to give SK the needed context as to what the plugin does.There are two options:
Option 1)
This would be the ideal solution. But currently, the
Microsoft.OpenApi.ApiManifest.ApiManifestDocument
class does not support a Description value and would have to be extended. I'm not sure if the official spec actually intends to support that or not, but I have seen Microsoft samples that do include a description value.Option 2)
Add an optional parameter to the method:
and then add the value when creating the KernelPlugin:
return KernelPluginFactory.CreateFromFunctions(pluginName, description, functions);
(Same would apply to ImportPluginFromApiManifestAsync)
Option 2) is really a very easy fix and I would really appreciate if that could be added.
Thanks
Alexander
The text was updated successfully, but these errors were encountered: