ABAO77's picture
Upload 38 files
24dcddf verified
raw
history blame contribute delete
706 Bytes
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()()