KernelPlugin Class
- java.
lang. Object - com.
microsoft. semantickernel. plugin. KernelPlugin
- com.
Implements
public class KernelPlugin
implements java.lang.Iterable<KernelFunction<?>>
A plugin contains a collection of functions that can be invoked by the Semantic Kernel.
Constructor Summary
| Constructor | Description |
|---|---|
| KernelPlugin(String name, String description, Map<String,KernelFunction<?>> plugins) |
Creates a new instance of the KernelPlugin class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Kernel |
get(String functionName)
Gets a function by name. |
| void |
addFunction(KernelFunction<?> function)
Adds a function to the plugin. |
| java.lang.String |
getDescription()
Gets the description of the plugin. |
|
java.util.Map<java.lang.String,Kernel |
getFunctions()
Gets the functions in the plugin. |
| java.lang.String |
getName()
Gets the name of the plugin. |
|
java.util.Iterator<Kernel |
iterator()
Get an |
Methods inherited from java.lang.Object
Constructor Details
KernelPlugin
public KernelPlugin(String name, String description, Map
Creates a new instance of the KernelPlugin class.
Parameters:
Method Details
get
public KernelFunction
Gets a function by name.
Parameters:
Returns:
null if no such function exists.addFunction
public void addFunction(KernelFunction function)
Adds a function to the plugin.
Parameters:
getDescription
public String getDescription()
Gets the description of the plugin.
Returns:
getFunctions
public Map
Gets the functions in the plugin.
Returns:
getName
public String getName()
Gets the name of the plugin.
Returns:
iterator
public Iterator
Get an Iterator that iterates over the functions of this plugin.
Returns:
Iterator that iterates over the functions of this plugin.