Udostępnij za pośrednictwem


KernelExtensions.CreatePluginFromFunctions Method

Definition

Overloads

CreatePluginFromFunctions(Kernel, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions.

CreatePluginFromFunctions(Kernel, String, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions.

CreatePluginFromFunctions(Kernel, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions.

public static Microsoft.SemanticKernel.KernelPlugin CreatePluginFromFunctions (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.KernelFunction>? functions);
static member CreatePluginFromFunctions : Microsoft.SemanticKernel.Kernel * string * seq<Microsoft.SemanticKernel.KernelFunction> -> Microsoft.SemanticKernel.KernelPlugin
<Extension()>
Public Function CreatePluginFromFunctions (kernel As Kernel, pluginName As String, functions As IEnumerable(Of KernelFunction)) As KernelPlugin

Parameters

kernel
Kernel

The Kernel containing services, plugins, and other state for use throughout the operation.

pluginName
String

The name for the plugin.

functions
IEnumerable<KernelFunction>

The initial functions to be available as part of the plugin.

Returns

A KernelPlugin containing the functions provided in functions.

Exceptions

functions contains two functions with the same name.

functions contains a null function.

Applies to

CreatePluginFromFunctions(Kernel, String, String, IEnumerable<KernelFunction>)

Creates a plugin that contains the specified functions.

public static Microsoft.SemanticKernel.KernelPlugin CreatePluginFromFunctions (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, string? description = default, System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.KernelFunction>? functions = default);
static member CreatePluginFromFunctions : Microsoft.SemanticKernel.Kernel * string * string * seq<Microsoft.SemanticKernel.KernelFunction> -> Microsoft.SemanticKernel.KernelPlugin
<Extension()>
Public Function CreatePluginFromFunctions (kernel As Kernel, pluginName As String, Optional description As String = Nothing, Optional functions As IEnumerable(Of KernelFunction) = Nothing) As KernelPlugin

Parameters

kernel
Kernel

The Kernel containing services, plugins, and other state for use throughout the operation.

pluginName
String

The name for the plugin.

description
String

A description of the plugin.

functions
IEnumerable<KernelFunction>

The initial functions to be available as part of the plugin.

Returns

A KernelPlugin containing the functions provided in functions.

Exceptions

functions contains two functions with the same name.

functions contains a null function.

Applies to