Update low_level.md (#1016)

replace add_edge by add_conditional_edges
fix a mistake
This commit is contained in:
Arthur Berman
2024-07-16 08:43:40 -07:00
committed by GitHub
parent ebeebcd095
commit 09c5ebc94d
+1 -1
View File
@@ -180,7 +180,7 @@ graph.add_edge("node_a", "node_b")
If you want to **optionally** route to 1 or more edges (or optionally terminate), you can use the [add_conditional_edges][langgraph.graph.StateGraph.add_conditional_edges] method. This method accepts the name of a node and a "routing function" to call after that node is executed:
```python
graph.add_edge("node_a", routing_function)
graph.add_conditional_edges("node_a", routing_function)
```
Similar to nodes, the `routing_function` accept the current `state` of the graph and return a value.