Share via


ApiManifestKernelExtensions.CreatePluginFromApiManifestAsync Method

Definition

Creates a kernel plugin from an API manifest file asynchronously.

public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> CreatePluginFromApiManifestAsync (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, string filePath, Microsoft.SemanticKernel.Plugins.OpenApi.Extensions.ApiManifestPluginParameters? pluginParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member CreatePluginFromApiManifestAsync : Microsoft.SemanticKernel.Kernel * string * string * Microsoft.SemanticKernel.Plugins.OpenApi.Extensions.ApiManifestPluginParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
<Extension()>
Public Function CreatePluginFromApiManifestAsync (kernel As Kernel, pluginName As String, filePath As String, Optional pluginParameters As ApiManifestPluginParameters = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KernelPlugin)

Parameters

kernel
Kernel

The kernel instance.

pluginName
String

The name of the plugin.

filePath
String

The file path of the API manifest.

pluginParameters
ApiManifestPluginParameters

Optional parameters for the plugin setup.

cancellationToken
CancellationToken

Optional cancellation token.

Returns

A task that represents the asynchronous operation. The task result contains the created kernel plugin.

Applies to