Python: TypeError: Plan.__init__() got an unexpected keyword argument 'prompt'
Describe the bug A clear and concise description of what the bug is.
When run 05-using-the-planner.ipynb, got error: TypeError: Plan.init() got an unexpected keyword argument 'prompt'.
To Reproduce Steps to reproduce the behavior:
- Go to 'https://github.com/microsoft/semantic-kernel/tree/main/samples/notebooks/python'
- jupyter notebook
- run 05-using-the-planner.ipynb
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Platform
- OS: [Mac]
- IDE: [e.g. Jupyter Notebook]
- Language: [Python]
- Source: [e.g. main branch of repository]
Additional context Add any other context about the problem here.
I got the same issue and managed to fix it by changing the last line of the function create_plan_async within basic_planner.py
Confirmed I experiencing this. How did you change it? I see can print the generated plan fine in the create_async_plan, but not sure how to create the plan object.
Fixed by replacing plan.py with old plan.py:
from typing import Any
class Plan: # The goal that wants to be achieved goal: str
# The prompt to be used to generate the plan
prompt: str
# The generated plan that consists of a list of steps to complete the goal
generated_plan: Any
def __init__(self, goal, prompt, plan):
self.goal = goal
self.prompt = prompt
self.generated_plan = plan
Yeah this notebook needs to be updated with the latest from the plan object model that got landed. #1907
We'll also have new planners coming in soon! #1770 #1916
Closed because we will be deprecating the basic planner