You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I have a question regarding the conditional edge in Langgraph.
I know in langgraph we can provide a dictionary to map the next node in the conditional edge: graph.add_conditional_edges("node_a", routing_function, {True: "node_b", False: "node_c"})
I also realize that Langgraph supports N-to-1 node in this way: builder.add_edge(["node_a", "node_b", "node_c"], "aggregate_node")
(The reason I must wrap all upstream nodes inside a list is to ensure that I receive all the nodes' state before entering the next node.)
Now, in my own circumstance, I have N-to-N node connections, where I have N upstream nodes, and each upstream node can navigate to a universal aggregated node or a node-specific (not shared across each upstream node) downstream node.
Could anyone explain how to construct this conditional edge in Langgraph? Thank you in advance.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I have a question regarding the conditional edge in Langgraph.
I know in langgraph we can provide a dictionary to map the next node in the conditional edge:
graph.add_conditional_edges("node_a", routing_function, {True: "node_b", False: "node_c"})
I also realize that Langgraph supports N-to-1 node in this way:
builder.add_edge(["node_a", "node_b", "node_c"], "aggregate_node")
(The reason I must wrap all upstream nodes inside a list is to ensure that I receive all the nodes' state before entering the next node.)
Now, in my own circumstance, I have N-to-N node connections, where I have N upstream nodes, and each upstream node can navigate to a universal aggregated node or a node-specific (not shared across each upstream node) downstream node.
Could anyone explain how to construct this conditional edge in Langgraph? Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions