ama2aifusion commited on
Commit
6050c53
·
verified ·
1 Parent(s): dce51f3

Update agent_v2.py

Browse files
Files changed (1) hide show
  1. agent_v2.py +2 -2
agent_v2.py CHANGED
@@ -802,10 +802,10 @@ def build_graph(provider: str = "huggingface"):
802
  tools_condition,
803
  {
804
  "tools": "tools",
805
- "none": "extractor", # Only go to extractor when no tool calls exist
 
806
  }
807
  )
808
-
809
  builder.add_edge("tools", "assistant")
810
  builder.set_finish_point("extractor")
811
 
 
802
  tools_condition,
803
  {
804
  "tools": "tools",
805
+ "none": "extractor",
806
+ "__end__": "__end__", # <- this tells LangGraph it's allowed to finish here
807
  }
808
  )
 
809
  builder.add_edge("tools", "assistant")
810
  builder.set_finish_point("extractor")
811