KaiserShultz commited on
Commit
d8bd1ee
·
verified ·
1 Parent(s): f65cea5

Update src/nodes.py

Browse files
Files changed (1) hide show
  1. src/nodes.py +4 -1
src/nodes.py CHANGED
@@ -475,13 +475,16 @@ def should_replan(state: AgentState) -> str:
475
  critique = state.get("critique_feedback")
476
  iteration_count = state.get("iteration_count", 0)
477
  max_iterations = state.get("max_iterations", 3)
478
-
479
 
480
  print(f"=== REPLAN DECISION ===")
481
  print(f"Iteration: {iteration_count}/{max_iterations}")
482
  print(f"Quality score: {critique.quality_score if critique else 'N/A'}")
483
  print(f"Needs replanning: {critique.needs_replanning if critique else 'N/A'}")
484
 
 
 
 
485
  if not critique:
486
  return "end"
487
 
 
475
  critique = state.get("critique_feedback")
476
  iteration_count = state.get("iteration_count", 0)
477
  max_iterations = state.get("max_iterations", 3)
478
+ activator = state.get("critic_replan", False)
479
 
480
  print(f"=== REPLAN DECISION ===")
481
  print(f"Iteration: {iteration_count}/{max_iterations}")
482
  print(f"Quality score: {critique.quality_score if critique else 'N/A'}")
483
  print(f"Needs replanning: {critique.needs_replanning if critique else 'N/A'}")
484
 
485
+ if not activator:
486
+ return "end"
487
+
488
  if not critique:
489
  return "end"
490