(name:str, state: PipelineState, sg_name: str)
| 128 | |
| 129 | |
| 130 | def 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 | |
| 146 | def conditional_edge(state: PipelineState) -> Literal["True", "False"]: |
no test coverage detected