Replies: 1 comment 2 replies
-
It seems like you're looking for a Python example for the Planner mentioned on the Microsoft page. Here's a translation of the provided code example: class AuthorEmailPlanner:
@KernelFunction
@Description("Returns the necessary steps for writing an email.")
async def GenerateRequiredStepsAsync(self, kernel, topic, recipients):
# Requests the LLM to generate a list of steps to complete the task
result = await kernel.InvokePromptAsync(f"""
I'm going to write an email to {recipients} about {topic} on behalf of a user.
Before I do that, could you succinctly recommend the top 3 steps I should take in a numbered list?
I want to make sure I don't forget anything that would help my user's email sound more professional.
""", {
"topic": topic,
"recipients": recipients
})
# Returns the plan to the agent
return result.toString() This example demonstrates how to create a Planner in Python called |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
where could I find the Python Example for the page https://learn.microsoft.com/en-us/semantic-kernel/agents/?
Or at least for the AuthorEmailPlanner mentioned there?
Thanks,
Dieter
Beta Was this translation helpful? Give feedback.
All reactions