OpenApiKernelPluginFactory.CreateFromOpenApiAsync 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
CreateFromOpenApiAsync(String, Stream, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates a plugin from an OpenAPI specification. |
CreateFromOpenApiAsync(String, String, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates a plugin from an OpenAPI specification. |
CreateFromOpenApiAsync(String, Uri, OpenApiFunctionExecutionParameters, CancellationToken) |
Creates a plugin from an OpenAPI specification. |
CreateFromOpenApiAsync(String, Stream, OpenApiFunctionExecutionParameters, CancellationToken)
Creates a plugin from an OpenAPI specification.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> CreateFromOpenApiAsync (string pluginName, System.IO.Stream stream, Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters? executionParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateFromOpenApiAsync : string * System.IO.Stream * Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
Public Shared Function CreateFromOpenApiAsync (pluginName As String, stream As Stream, Optional executionParameters As OpenApiFunctionExecutionParameters = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KernelPlugin)
Parameters
- pluginName
- String
Plugin name.
- stream
- Stream
A stream representing the OpenAPI Plugin.
- executionParameters
- OpenApiFunctionExecutionParameters
Plugin execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A KernelPlugin instance whose functions correspond to the OpenAPI operations.
Applies to
CreateFromOpenApiAsync(String, String, OpenApiFunctionExecutionParameters, CancellationToken)
Creates a plugin from an OpenAPI specification.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> CreateFromOpenApiAsync (string pluginName, string filePath, Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters? executionParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateFromOpenApiAsync : string * string * Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
Public Shared Function CreateFromOpenApiAsync (pluginName As String, filePath As String, Optional executionParameters As OpenApiFunctionExecutionParameters = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KernelPlugin)
Parameters
- pluginName
- String
Plugin name.
- filePath
- String
The file path to the OpenAPI Plugin.
- executionParameters
- OpenApiFunctionExecutionParameters
Plugin execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A KernelPlugin instance whose functions correspond to the OpenAPI operations.
Applies to
CreateFromOpenApiAsync(String, Uri, OpenApiFunctionExecutionParameters, CancellationToken)
Creates a plugin from an OpenAPI specification.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> CreateFromOpenApiAsync (string pluginName, Uri uri, Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters? executionParameters = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateFromOpenApiAsync : string * Uri * Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiFunctionExecutionParameters * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin>
Public Shared Function CreateFromOpenApiAsync (pluginName As String, uri As Uri, Optional executionParameters As OpenApiFunctionExecutionParameters = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of KernelPlugin)
Parameters
- pluginName
- String
Plugin name.
- uri
- Uri
A local or remote URI referencing the OpenAPI Plugin.
- executionParameters
- OpenApiFunctionExecutionParameters
Plugin execution parameters.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A KernelPlugin instance whose functions correspond to the OpenAPI operations.