package {{packageName}}.graph;

{{importSection}}

@Component
public class GraphBuilder {

    {{assistMethodCode}}

    @Bean
    public CompiledGraph buildGraph(ChatModel chatModel) throws Exception {
        // new stateGraph
        StateGraph stateGraph = new StateGraph({{stateSection}});
        // add nodes
        {{nodeSection}}
        // add edges
        {{edgeSection}}
        return stateGraph.compile();
    }

}
