Spaces:
Sleeping
Sleeping
collect some error
Browse files- chatbot_simulator.py +7 -1
chatbot_simulator.py
CHANGED
@@ -136,9 +136,15 @@ Example Output Format:
|
|
136 |
# Parse and update the user state
|
137 |
updated_state = json_repair.loads(updated_state)
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
try:
|
140 |
if updated_state['task_completed'].lower() == 'true':
|
141 |
-
|
142 |
except:
|
143 |
updated_state['task_completed'] = 'False'
|
144 |
|
|
|
136 |
# Parse and update the user state
|
137 |
updated_state = json_repair.loads(updated_state)
|
138 |
|
139 |
+
if isinstance(updated_state, dict):
|
140 |
+
pass
|
141 |
+
else:
|
142 |
+
print(updated_state)
|
143 |
+
print(type(updated_state))
|
144 |
+
|
145 |
try:
|
146 |
if updated_state['task_completed'].lower() == 'true':
|
147 |
+
print(f"Task completed! You took {self.prompt_count} steps.")
|
148 |
except:
|
149 |
updated_state['task_completed'] = 'False'
|
150 |
|