Spaces:
Build error
Build error
| 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) | |
| 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()() | |