Skip to content
Discussion options

You must be logged in to vote

@haithamshahin333, it can be handled like this:

prompt_func = KernelFunctionFromPrompt(
    function_name="world",
    prompt="Tell me something interesting about the world",
)

@kernel_function
def get_weather(self, location: str) -> str:
    """Get the weather for a given location."""
    return f"The weather in {location} is sunny."

kernel.add_functions(plugin_name="SomePlugin", functions=[prompt_func, get_weather])

Those two functions get grouped under the plugin with the name SomePlugin.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sophialagerkranspandey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants