MCPcopy Index your code
hub / github.com/LangGraph-GUI/LangGraph-GUI-backend / sg_add

Function sg_add

src/WorkFlow.py:130–143  ·  view source on GitHub ↗
(name:str, state: PipelineState, sg_name: str)

Source from the content-addressed store, hash-verified

128
129
130def sg_add(name:str, state: PipelineState, sg_name: str) -> PipelineState:
131 logger(f"{name} is working, it is a subgraph node call {sg_name} ...")
132 subgraph = subgraph_registry[sg_name]
133 response = subgraph.invoke(
134 PipelineState(
135 history=state["history"],
136 task=state["task"],
137 condition=state["condition"]
138 )
139 )
140 state["history"] = response["history"]
141 state["task"] = response["task"]
142 state["condition"] = response["condition"]
143 return state
144
145
146def conditional_edge(state: PipelineState) -> Literal["True", "False"]:

Callers 1

build_subgraphFunction · 0.85

Calls 2

loggerFunction · 0.90
PipelineStateClass · 0.85

Tested by

no test coverage detected