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
I searched existing ideas and did not find a similar one
I added a very descriptive title
I've clearly described the feature request and motivation for it
Feature request
When drawing a graph with conditional edges, there is the possibility to name those edges: graph.add_conditional_edges("branch_a", router, {"branch_b": "branch_b", "branch_c": "branch_c"})
It would be great if it could also handle not just strings but also boolean values such as: graph.add_conditional_edges("branch_a", return_true_or_false, {True "branch_b", False: "branch_c"})
`
but the library expects a string, tries to split it and thats where it fails when using boolean values.
Motivation
Often there are use-cases where we have 2 paths from a node. Example: determine whether the AI makes a tool call or not:
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.
-
Checked
Feature request
When drawing a graph with conditional edges, there is the possibility to name those edges:
graph.add_conditional_edges("branch_a", router, {"branch_b": "branch_b", "branch_c": "branch_c"})
It would be great if it could also handle not just strings but also boolean values such as:
graph.add_conditional_edges("branch_a", return_true_or_false, {True "branch_b", False: "branch_c"})
`
but the library expects a string, tries to split it and thats where it fails when using boolean values.
Motivation
Often there are use-cases where we have 2 paths from a node. Example: determine whether the AI makes a tool call or not:
flow.add_conditional_edges("classify_query", has_tool_calls, { True: "branch_a", False: "branch_b"})
this way, has_tool_calls can be re-used and we don't need a separate methhod for each conditional branch that checks on the same condition.
Proposal (If applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions