Share via


OpenApiKernelExtensions.CreatePluginFromOpenApiAsync Method

Definition

Overloads

CreatePluginFromOpenApiAsync(Kernel, String, Stream, OpenApiFunctionExecutionParameters, CancellationToken)

Creates a plugin from an OpenAPI specification.

CreatePluginFromOpenApiAsync(Kernel, String, String, OpenApiFunctionExecutionParameters, CancellationToken)

Creates a plugin from an OpenAPI specification.

CreatePluginFromOpenApiAsync(Kernel, String, Uri, OpenApiFunctionExecutionParameters, CancellationToken)

Creates a plugin from an OpenAPI specification.

CreatePluginFromOpenApiAsync(Kernel, String, Stream, OpenApiFunctionExecutionParameters, CancellationToken)

Creates a plugin from an OpenAPI specification.

public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.KernelPlugin> CreatePluginFromOpenApiAsync (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 CreatePluginFromOpenApiAsync : 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 CreatePluginFromOpenApiAsync (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

CreatePluginFromOpenApiAsync(Kernel, String, String, OpenApiFunctionExecutionParameters, CancellationToken)

Creates a plugin from an OpenAPI specification.

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

CreatePluginFromOpenApiAsync(Kernel, String, Uri, OpenApiFunctionExecutionParameters, CancellationToken)

Creates a plugin from an OpenAPI specification.

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

Applies to