Spaces:
Build error
Build error
File size: 706 Bytes
24dcddf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | from langgraph.graph import StateGraph, START, END
from .func import State, highlight_explain
from langgraph.graph.state import CompiledStateGraph
class HighlightExplainAgent:
def __init__(self):
self.builder = StateGraph(State)
@staticmethod
def routing(state: State):
pass
def node(self):
self.builder.add_node("highlight_explain", highlight_explain)
def edge(self):
self.builder.add_edge(START, "highlight_explain")
self.builder.add_edge("highlight_explain", END)
def __call__(self) -> CompiledStateGraph:
self.node()
self.edge()
return self.builder.compile()
highlight_workflow = HighlightExplainAgent()()
|