File size: 546 Bytes
0134d89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from langchain_core.messages import AIMessage
from utils.inference import call_model

def run(state):
    requirements = state["product_requirements"]
    prompt = f"""You are a project manager. Based on the following product requirements, create a task breakdown and milestone plan.

Requirements:
{requirements}

Respond with a structured plan with at least 3 milestones and 2-3 tasks each."""
    output = call_model(prompt)
    return {
        "messages": state["messages"] + [AIMessage(content=output)],
        "project_plan": output
    }