Spaces:
Runtime error
Runtime error
Greg Thompson
commited on
Commit
·
31caaf3
1
Parent(s):
a9b208c
Use context_data's user_message for condition
Browse files
mathtext_fastapi/conversation_manager.py
CHANGED
|
@@ -79,12 +79,14 @@ def generate_message(data_json):
|
|
| 79 |
user_message = message_data['message']['text']['body']
|
| 80 |
|
| 81 |
print("===============")
|
|
|
|
|
|
|
| 82 |
print("context_data")
|
| 83 |
print(context_data)
|
| 84 |
print("===============")
|
| 85 |
|
| 86 |
|
| 87 |
-
if user_message == '' and context_data['state'] == 'start-conversation':
|
| 88 |
message_package = {
|
| 89 |
'messages': [],
|
| 90 |
'input_prompt': "Welcome to our math practice. What would you like to try? Type add or subtract.",
|
|
|
|
| 79 |
user_message = message_data['message']['text']['body']
|
| 80 |
|
| 81 |
print("===============")
|
| 82 |
+
print("message_data")
|
| 83 |
+
print(message_data)
|
| 84 |
print("context_data")
|
| 85 |
print(context_data)
|
| 86 |
print("===============")
|
| 87 |
|
| 88 |
|
| 89 |
+
if context_data['user_message'] == '' and context_data['state'] == 'start-conversation':
|
| 90 |
message_package = {
|
| 91 |
'messages': [],
|
| 92 |
'input_prompt': "Welcome to our math practice. What would you like to try? Type add or subtract.",
|