OpenApiKernelExtensions.ImportPluginFromOpenApiAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ImportPluginFromOpenApiAsync(Kernel, String, Stream, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates a plugin from an OpenAPI specification and adds it to the kernel's plugins collection. |
ImportPluginFromOpenApiAsync(Kernel, String, String, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates a plugin from an OpenAPI specification and adds it to the kernel's plugins collection. |
ImportPluginFromOpenApiAsync(Kernel, String, Uri, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates a plugin from an OpenAPI specification and adds it to the kernel's plugins collection. |
ImportPluginFromOpenApiAsync(Kernel, String, Stream, OpenApiFunctionExecutionParameters, CancellationToken)
Creates a plugin from an OpenAPI specification and adds it to the kernel's plugins collection.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> ImportPluginFromOpenApiAsync (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, System.IO.Stream stream, Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters? executionParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member ImportPluginFromOpenApiAsync : Microsoft.SemanticKernel.Kernel * string * System.IO.Stream * Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
<Extension()>
Public Function ImportPluginFromOpenApiAsync (kernel As Kernel, pluginName As String, stream As Stream, Optional executionParameters As OpenApiFunctionExecutionParameters = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KernelPlugin)
Parameters
- kernel
- Kernel
The Kernel containing services, plugins, and other state for use throughout the operation.
- pluginName
- String
Plugin name.
- stream
- Stream
A stream representing the AI Plugin
- executionParameters
- OpenApiFunctionExecutionParameters
Plugin execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A collection of invocable functions
Applies to
ImportPluginFromOpenApiAsync(Kernel, String, String, OpenApiFunctionExecutionParameters, CancellationToken)
Creates a plugin from an OpenAPI specification and adds it to the kernel's plugins collection.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> ImportPluginFromOpenApiAsync (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, string filePath, Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters? executionParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member ImportPluginFromOpenApiAsync : Microsoft.SemanticKernel.Kernel * string * string * Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
<Extension()>
Public Function ImportPluginFromOpenApiAsync (kernel As Kernel, pluginName As String, filePath As String, Optional executionParameters As OpenApiFunctionExecutionParameters = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KernelPlugin)
Parameters
- kernel
- Kernel
The Kernel containing services, plugins, and other state for use throughout the operation.
- pluginName
- String
Plugin name.
- filePath
- String
The file path to the AI Plugin
- executionParameters
- OpenApiFunctionExecutionParameters
Plugin execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A collection of invocable functions
Applies to
ImportPluginFromOpenApiAsync(Kernel, String, Uri, OpenApiFunctionExecutionParameters, CancellationToken)
Creates a plugin from an OpenAPI specification and adds it to the kernel's plugins collection.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> ImportPluginFromOpenApiAsync (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, Uri uri, Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters? executionParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member ImportPluginFromOpenApiAsync : Microsoft.SemanticKernel.Kernel * string * Uri * Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
<Extension()>
Public Function ImportPluginFromOpenApiAsync (kernel As Kernel, pluginName As String, uri As Uri, Optional executionParameters As OpenApiFunctionExecutionParameters = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KernelPlugin)
Parameters
- kernel
- Kernel
The Kernel containing services, plugins, and other state for use throughout the operation.
- pluginName
- String
Plugin name.
- uri
- Uri
A local or remote URI referencing the AI Plugin
- executionParameters
- OpenApiFunctionExecutionParameters
Plugin execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A collection of invocable functions