OpenApiKernelExtensions.ImportPluginFromOpenApi 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.
Creates KernelPlugin from an OpenAPI specification and adds it to Plugins.
public static Microsoft.SemanticKernel.KernelPlugin ImportPluginFromOpenApi(this Microsoft.SemanticKernel.Kernel kernel, string pluginName, Microsoft.SemanticKernel.Plugins.OpenApi.RestApiSpecification specification, Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters? executionParameters = default);
static member ImportPluginFromOpenApi : Microsoft.SemanticKernel.Kernel * string * Microsoft.SemanticKernel.Plugins.OpenApi.RestApiSpecification * Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters -> Microsoft.SemanticKernel.KernelPlugin
<Extension()>
Public Function ImportPluginFromOpenApi (kernel As Kernel, pluginName As String, specification As RestApiSpecification, Optional executionParameters As OpenApiFunctionExecutionParameters = Nothing) As KernelPlugin
Parameters
- kernel
- Kernel
The Kernel containing services, plugins, and other state for use throughout the operation.
- pluginName
- String
The plugin name.
- specification
- RestApiSpecification
The specification model.
- executionParameters
- OpenApiFunctionExecutionParameters
The OpenAPI specification parsing and function execution parameters.
Returns
A KernelPlugin instance that contains functions corresponding to the operations defined in the OpenAPI specification.