Skip to content

Externalise native plugin description #7058

Closed Answered by dmytrostruk
Manish-22 asked this question in Q&A
Discussion options

You must be logged in to vote

@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!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Manish-22
Comment options

Answer selected by Manish-22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants