cryogenic22 commited on
Commit
44807d8
·
verified ·
1 Parent(s): 842058f

Update graph_builder.py

Browse files
Files changed (1) hide show
  1. 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: workflow.get_next_node(node) if node != "store_in_knowledge_base" else None
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