aparnavellala commited on
Commit
30287f6
·
verified ·
1 Parent(s): 1f1d42e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -173,7 +173,7 @@ def supervisor_chain(state):
173
  # Validate the next action
174
  if next_action not in options:
175
  raise ValueError(f"Invalid next action: '{next_action}'. Expected one of {options}.")
176
- """
177
  # Initialize intermediate_steps if not already present
178
  if "intermediate_steps" not in state:
179
  state["intermediate_steps"] = []
@@ -185,9 +185,7 @@ def supervisor_chain(state):
185
 
186
  print(f"[DEBUG] Next action decided: {next_action}") # Log decision
187
  return {"next": next_action, "messages": messages, "intermediate_steps": state["intermediate_steps"]}
188
- """
189
- print(f"[DEBUG] Next action decided: {next_action}") # Log decision
190
- return {"next": next_action, "messages": messages}
191
 
192
  except Exception as e:
193
  print(f"[ERROR] Supervisor chain failed: {e}")
@@ -273,8 +271,8 @@ initial_state = {
273
  #HumanMessage(content="Code hello world and print it to the terminal.") # Correct format for user input
274
  HumanMessage(content="Write Code for printing \"hello world\" in Python. Keep it precise.") # Correct format for user input
275
  ]
276
- #,
277
- #"intermediate_steps": [] # Add this to track progress if needed
278
  }
279
 
280
 
 
173
  # Validate the next action
174
  if next_action not in options:
175
  raise ValueError(f"Invalid next action: '{next_action}'. Expected one of {options}.")
176
+
177
  # Initialize intermediate_steps if not already present
178
  if "intermediate_steps" not in state:
179
  state["intermediate_steps"] = []
 
185
 
186
  print(f"[DEBUG] Next action decided: {next_action}") # Log decision
187
  return {"next": next_action, "messages": messages, "intermediate_steps": state["intermediate_steps"]}
188
+
 
 
189
 
190
  except Exception as e:
191
  print(f"[ERROR] Supervisor chain failed: {e}")
 
271
  #HumanMessage(content="Code hello world and print it to the terminal.") # Correct format for user input
272
  HumanMessage(content="Write Code for printing \"hello world\" in Python. Keep it precise.") # Correct format for user input
273
  ]
274
+ ,
275
+ "intermediate_steps": [] # Add this to track progress if needed
276
  }
277
 
278