Externalise native plugin description #7058
-
For a native function such as this
How can I set the description from a text file or a database? |
Beta Was this translation helpful? Give feedback.
Answered by
dmytrostruk
Jul 2, 2024
Replies: 1 comment 1 reply
-
@Manish-22 You can use imperative approach how to define and import native functions in Kernel. Based on your example, it will look like this: kernel.ImportPluginFromFunctions("MyPlugin",
[
kernel.CreateFunctionFromMethod(
() => lights,
functionName: "get_lights",
description: "Gets a list of lights and their current state",
returnParameter: new() { Description = "An array of lights" }),
]); For description, you can call another service which will pull your description from text file, configuration or a database. Let us know if that covers your scenario. Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Manish-22
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Manish-22 You can use imperative approach how to define and import native functions in Kernel. Based on your example, it will look like this:
For description, you can call another service which will pull your description from text file, configuration or a database. Let us know if that covers your scenario. Thanks!