mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-09 19:27:54 +02:00
Merge pull request #1089 from mihaic/patch-1
Fix StateGraph.add_edge end_key check
This commit is contained in:
@@ -358,8 +358,8 @@ class StateGraph(Graph):
|
||||
raise ValueError("END cannot be a start node")
|
||||
if start not in self.nodes:
|
||||
raise ValueError(f"Need to add_node `{start}` first")
|
||||
if end_key == END:
|
||||
raise ValueError("END cannot be an end node")
|
||||
if end_key == START:
|
||||
raise ValueError("START cannot be an end node")
|
||||
if end_key not in self.nodes:
|
||||
raise ValueError(f"Need to add_node `{end_key}` first")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user