File size: 567 Bytes
2166c8f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from langchain_core.messages import AIMessage
from utils.inference import call_model

def run(state):
    plan = state["project_plan"]
    prompt = f"""You are a software architect. Based on the following project plan, describe the architecture for the front-end web app to be built. Include:

- Component structure
- Layout strategy
- Any libraries or standards
- HTML/CSS structuring notes

Project Plan:
{plan}"""
    output = call_model(prompt)
    return {
        "messages": state["messages"] + [AIMessage(content=output)],
        "architecture": output
    }