How can you combine both prompt functions and native code functions in one plugin? #5709
-
Hello SK users. I am developing a chat application. Is that possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can create a new plugin that contains all the functions from other plugins, e.g. KernelPlugin plugin1 = ...;
KernelPlugin plugin2 = ...;
KernelPlugin combined = KernelPluginFactory.CreateFromFunctions("MyCoolPlugin", [..plugin1, ..plugin2]); You can also write your own KernelPlugin-derived types. Here's an example of writing and using a mutable one that let's you add and remove functions. |
Beta Was this translation helpful? Give feedback.
You can create a new plugin that contains all the functions from other plugins, e.g.
You can also write your own KernelPlugin-derived types. Here's an example of writing and using a mutable one that let's you add and remove functions.
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example69_MutableKernelPlugin.cs