KernelPluginFactory.CreateFromFunctions 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
CreateFromFunctions(String, IEnumerable<KernelFunction>) |
Initializes the new plugin from the provided name and function collection. |
CreateFromFunctions(String, String, IEnumerable<KernelFunction>) |
Initializes the new plugin from the provided name, description, and function collection. |
CreateFromFunctions(String, IEnumerable<KernelFunction>)
Initializes the new plugin from the provided name and function collection.
public static Microsoft.SemanticKernel.KernelPlugin CreateFromFunctions (string pluginName, System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.KernelFunction>? functions);
static member CreateFromFunctions : string * seq<Microsoft.SemanticKernel.KernelFunction> -> Microsoft.SemanticKernel.KernelPlugin
Public Shared Function CreateFromFunctions (pluginName As String, functions As IEnumerable(Of KernelFunction)) As KernelPlugin
Parameters
- 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
CreateFromFunctions(String, String, IEnumerable<KernelFunction>)
Initializes the new plugin from the provided name, description, and function collection.
public static Microsoft.SemanticKernel.KernelPlugin CreateFromFunctions (string pluginName, string? description = default, System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.KernelFunction>? functions = default);
static member CreateFromFunctions : string * string * seq<Microsoft.SemanticKernel.KernelFunction> -> Microsoft.SemanticKernel.KernelPlugin
Public Shared Function CreateFromFunctions (pluginName As String, Optional description As String = Nothing, Optional functions As IEnumerable(Of KernelFunction) = Nothing) As KernelPlugin
Parameters
- 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.