Spaces:
Sleeping
Sleeping
Create project_manager.py
Browse files- agents/project_manager.py +16 -0
agents/project_manager.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from langchain_core.messages import AIMessage
|
| 2 |
+
from utils.inference import call_model
|
| 3 |
+
|
| 4 |
+
def run(state):
|
| 5 |
+
requirements = state["product_requirements"]
|
| 6 |
+
prompt = f"""You are a project manager. Based on the following product requirements, create a task breakdown and milestone plan.
|
| 7 |
+
|
| 8 |
+
Requirements:
|
| 9 |
+
{requirements}
|
| 10 |
+
|
| 11 |
+
Respond with a structured plan with at least 3 milestones and 2-3 tasks each."""
|
| 12 |
+
output = call_model(prompt)
|
| 13 |
+
return {
|
| 14 |
+
"messages": state["messages"] + [AIMessage(content=output)],
|
| 15 |
+
"project_plan": output
|
| 16 |
+
}
|