KernelExtensions.ImportPluginFromFunctions 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
ImportPluginFromFunctions(Kernel, String, IEnumerable<KernelFunction>) |
Creates a plugin that contains the specified functions and imports it into the |
ImportPluginFromFunctions(Kernel, String, String, IEnumerable<KernelFunction>) |
Creates a plugin that contains the specified functions and imports it into the |
ImportPluginFromFunctions(Kernel, String, IEnumerable<KernelFunction>)
Creates a plugin that contains the specified functions and imports it into the kernel
's plugin collection.
public static Microsoft.SemanticKernel.KernelPlugin ImportPluginFromFunctions (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.KernelFunction>? functions);
static member ImportPluginFromFunctions : Microsoft.SemanticKernel.Kernel * string * seq<Microsoft.SemanticKernel.KernelFunction> -> Microsoft.SemanticKernel.KernelPlugin
<Extension()>
Public Function ImportPluginFromFunctions (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
ImportPluginFromFunctions(Kernel, String, String, IEnumerable<KernelFunction>)
Creates a plugin that contains the specified functions and imports it into the kernel
's plugin collection.
public static Microsoft.SemanticKernel.KernelPlugin ImportPluginFromFunctions (this Microsoft.SemanticKernel.Kernel kernel, string pluginName, string? description = default, System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.KernelFunction>? functions = default);
static member ImportPluginFromFunctions : Microsoft.SemanticKernel.Kernel * string * string * seq<Microsoft.SemanticKernel.KernelFunction> -> Microsoft.SemanticKernel.KernelPlugin
<Extension()>
Public Function ImportPluginFromFunctions (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.