Spaces:
Runtime error
Runtime error
Greg Thompson
commited on
Commit
·
55127fa
1
Parent(s):
f87e58b
Fix bug with initial state of curriculum FSM
Browse files
mathtext_fastapi/v2_conversation_manager.py
CHANGED
@@ -197,11 +197,13 @@ def manage_conversation_response(data_json):
|
|
197 |
# }
|
198 |
print("STEP 1")
|
199 |
print(data_json)
|
|
|
200 |
if not context_data['current_state']:
|
201 |
context_data['current_state'] = 'N1.1.1_G1'
|
|
|
202 |
|
203 |
curriculum_copy = copy.deepcopy(gsm.curriculum)
|
204 |
-
|
205 |
print("STEP 2")
|
206 |
if user_message == 'easier':
|
207 |
curriculum_copy.left()
|
@@ -254,4 +256,5 @@ def manage_conversation_response(data_json):
|
|
254 |
"type": 'ask'
|
255 |
}
|
256 |
}
|
|
|
257 |
return updated_context
|
|
|
197 |
# }
|
198 |
print("STEP 1")
|
199 |
print(data_json)
|
200 |
+
print(f"1: {context_data['current_state']}")
|
201 |
if not context_data['current_state']:
|
202 |
context_data['current_state'] = 'N1.1.1_G1'
|
203 |
+
print(f"2: {context_data['current_state']}")
|
204 |
|
205 |
curriculum_copy = copy.deepcopy(gsm.curriculum)
|
206 |
+
curriculum_copy.set_state(context_data['current_state'])
|
207 |
print("STEP 2")
|
208 |
if user_message == 'easier':
|
209 |
curriculum_copy.left()
|
|
|
256 |
"type": 'ask'
|
257 |
}
|
258 |
}
|
259 |
+
print(updated_context)
|
260 |
return updated_context
|