Redmind commited on
Commit
d27e80b
·
verified ·
1 Parent(s): 4149f35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -754,12 +754,15 @@ def answer_question_thread(user_question, chatbot,audio=None):
754
  return user_question, response_text
755
  else:
756
  if ("max iterations" in response_text):
 
757
  # Loop through and print all intermediate steps
758
- for i, (action, observation) in enumerate(intermediate_steps):
759
- print(f"\nIteration {i + 1}:")
760
- print(f" Action: {action.tool}")
761
- print(f" Tool Input: {action.tool_input}")
762
- print(f" Observation: {observation}")
 
 
763
 
764
  return user_question, response_text
765
  # response_text = response_text.replace('\n', ' ').replace(' ', ' ').strip()
 
754
  return user_question, response_text
755
  else:
756
  if ("max iterations" in response_text):
757
+ print(intermediate_steps)
758
  # Loop through and print all intermediate steps
759
+ #for i, (action, observation) in enumerate(intermediate_steps):
760
+ for steps in intermediate_steps:
761
+ print(steps)
762
+ #print(f"\nIteration {i + 1}:")
763
+ #print(f" Action: {action.tool}")
764
+ #print(f" Tool Input: {action.tool_input}")
765
+ #print(f" Observation: {observation}")
766
 
767
  return user_question, response_text
768
  # response_text = response_text.replace('\n', ' ').replace(' ', ' ').strip()