Spaces:
Runtime error
Runtime error
Update graph_builder.py
Browse files- graph_builder.py +1 -2
graph_builder.py
CHANGED
|
@@ -712,7 +712,6 @@ def build_document_extraction_graph():
|
|
| 712 |
workflow.add_edge("store_in_knowledge_base", END)
|
| 713 |
|
| 714 |
# Handle errors - any node can output an error
|
| 715 |
-
# FIX: Properly define the conditional edges to handle errors
|
| 716 |
for node in workflow.nodes:
|
| 717 |
# Check if status is error, if yes, go to END
|
| 718 |
workflow.add_conditional_edges(
|
|
@@ -720,7 +719,7 @@ def build_document_extraction_graph():
|
|
| 720 |
lambda state: "status" in state and state["status"] == "error",
|
| 721 |
{
|
| 722 |
True: END,
|
| 723 |
-
False:
|
| 724 |
}
|
| 725 |
)
|
| 726 |
|
|
|
|
| 712 |
workflow.add_edge("store_in_knowledge_base", END)
|
| 713 |
|
| 714 |
# Handle errors - any node can output an error
|
|
|
|
| 715 |
for node in workflow.nodes:
|
| 716 |
# Check if status is error, if yes, go to END
|
| 717 |
workflow.add_conditional_edges(
|
|
|
|
| 719 |
lambda state: "status" in state and state["status"] == "error",
|
| 720 |
{
|
| 721 |
True: END,
|
| 722 |
+
False: None # Let the normal flow continue
|
| 723 |
}
|
| 724 |
)
|
| 725 |
|