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 KernelPlugin from an OpenAPI specification and adds it to Plugins. |
ImportPluginFromOpenApiAsync(Kernel, String, String, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates KernelPlugin from an OpenAPI specification and adds it to Plugins. |
ImportPluginFromOpenApiAsync(Kernel, String, Uri, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates KernelPlugin from an OpenAPI specification and adds it to Plugins. |
ImportPluginFromOpenApiAsync(Kernel, String, Stream, OpenApiFunctionExecutionParameters, CancellationToken)
Creates KernelPlugin from an OpenAPI specification and adds it to Plugins.
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
The plugin name.
- stream
- Stream
A stream representing the OpenAPI specification.
- executionParameters
- OpenApiFunctionExecutionParameters
The OpenAPI specification parsing and function execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A KernelPlugin instance that contains functions corresponding to the operations defined in the OpenAPI specification.
Applies to
ImportPluginFromOpenApiAsync(Kernel, String, String, OpenApiFunctionExecutionParameters, CancellationToken)
Creates KernelPlugin from an OpenAPI specification and adds it to Plugins.
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
The plugin name.
- filePath
- String
The file path to the OpenAPI specification.
- executionParameters
- OpenApiFunctionExecutionParameters
The OpenAPI specification parsing and function execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A KernelPlugin instance that contains functions corresponding to the operations defined in the OpenAPI specification.
Applies to
ImportPluginFromOpenApiAsync(Kernel, String, Uri, OpenApiFunctionExecutionParameters, CancellationToken)
Creates KernelPlugin from an OpenAPI specification and adds it to Plugins.
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
The plugin name.
- uri
- Uri
A URI referencing the OpenAPI specification.
- executionParameters
- OpenApiFunctionExecutionParameters
The OpenAPI specification parsing and function execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A KernelPlugin instance that contains functions corresponding to the operations defined in the OpenAPI specification.