mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-12 12:47:53 +02:00
Shorten conditional edge names
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+66
-66
@@ -3086,39 +3086,39 @@ def test_in_one_fan_out_state_graph_waiting_edge_via_branch(
|
||||
app = workflow.compile()
|
||||
|
||||
assert app.get_graph().draw_ascii() == (
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+--------------+ +-------------------------+
|
||||
| analyzer_one | | rewrite_query_condition |
|
||||
+--------------+ +-------------------------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+--------------+ +-----------+
|
||||
| analyzer_one | | condition |
|
||||
+--------------+ +-----------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
)
|
||||
|
||||
assert app.invoke({"query": "what is weather in sf"}, debug=True) == {
|
||||
@@ -3220,39 +3220,39 @@ def test_in_one_fan_out_state_graph_waiting_edge_custom_state_class(
|
||||
app = workflow.compile()
|
||||
|
||||
assert app.get_graph().draw_ascii() == (
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+--------------+ +-----------------------+
|
||||
| analyzer_one | | rewrite_query_decider |
|
||||
+--------------+ +-----------------------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+--------------+ +---------+
|
||||
| analyzer_one | | decider |
|
||||
+--------------+ +---------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
)
|
||||
|
||||
with pytest.raises(ValidationError):
|
||||
|
||||
+66
-66
@@ -2825,39 +2825,39 @@ async def test_in_one_fan_out_state_graph_waiting_edge_via_branch(
|
||||
app = workflow.compile()
|
||||
|
||||
assert app.get_graph().draw_ascii() == (
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+--------------+ +-------------------------+
|
||||
| analyzer_one | | rewrite_query_condition |
|
||||
+--------------+ +-------------------------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+--------------+ +-----------+
|
||||
| analyzer_one | | condition |
|
||||
+--------------+ +-----------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
)
|
||||
|
||||
assert await app.ainvoke({"query": "what is weather in sf"}, debug=True) == {
|
||||
@@ -2962,39 +2962,39 @@ async def test_in_one_fan_out_state_graph_waiting_edge_custom_state_class(
|
||||
app = workflow.compile()
|
||||
|
||||
assert app.get_graph().draw_ascii() == (
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+--------------+ +-----------------------+
|
||||
| analyzer_one | | rewrite_query_decider |
|
||||
+--------------+ +-----------------------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
** **
|
||||
** **
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
""" +-----------+
|
||||
| __start__ |
|
||||
+-----------+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------------+
|
||||
| rewrite_query |
|
||||
+---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+--------------+ +---------+
|
||||
| analyzer_one | | decider |
|
||||
+--------------+ +---------+
|
||||
* *
|
||||
* *
|
||||
* *
|
||||
+---------------+ +---------------+
|
||||
| retriever_one | | retriever_two |
|
||||
+---------------+ +---------------+
|
||||
*** ***
|
||||
* *
|
||||
** **
|
||||
+----+
|
||||
| qa |
|
||||
+----+
|
||||
*
|
||||
*
|
||||
*
|
||||
+---------+
|
||||
| __end__ |
|
||||
+---------+ """
|
||||
)
|
||||
|
||||
with pytest.raises(ValidationError):
|
||||
|
||||
Reference in New Issue
Block a user