Semantic Kernel plugin templates from database #7106
-
Is it possible to store plugin templates in database and create plugin from retrieved .json settings and .txt with input parameters denoted by $ and {{ function call }}? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@jamesmkfoo23 In theory it's possible, as well as storing plugin templates in files. But you will have to create instances of these functions on your side, in similar way like we do this with files: It would be interesting to learn about your use-case to recommend the best approach how to work with plugin templates, so if you could share any details, that would be great! Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi @dmytrostruk , I am using Python kernel.add_plugin at the moment.
What I am thinking of is to define the plugins which consist of prompt template & config json, in the DB. From Front End application to get the plugin information and parameterize the inputs for submission, the prompt preview is displayed for the user which explains how the inputs are used in the prompt. Think of a use case which is more toward a specific utility or task that could use LLM/tools. Being able to store the plugins in DB can allow for better versioning and test result tracking, but I would like to avoid defining it twice: |
Beta Was this translation helpful? Give feedback.
@jamesmkfoo23 In theory it's possible, as well as storing plugin templates in files. But you will have to create instances of these functions on your side, in similar way like we do this with files:
semantic-kernel/dotnet/src/SemanticKernel.Core/KernelExtensions.cs
Line 517 in a0a753a
It would be interesting to learn about your use-case to recommend the best approach how to work with plugin templates, so if you could share any details, that would be great! Thank you!