Partager via


ApiManifestKernelExtensions.ImportPluginFromApiManifestAsync Method

Definition

Imports a plugin from an API manifest asynchronously.

public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> ImportPluginFromApiManifestAsync (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, string filePath, Microsoft.SemanticKernel.Plugins.OpenApi.Extensions.ApiManifestPluginParameters? pluginParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member ImportPluginFromApiManifestAsync : Microsoft.SemanticKernel.Kernel * string * string * Microsoft.SemanticKernel.Plugins.OpenApi.Extensions.ApiManifestPluginParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
<Extension()>
Public Function ImportPluginFromApiManifestAsync (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

The imported plugin.

Applies to