Spaces:
Runtime error
Runtime error
Greg Thompson
commited on
Commit
·
01dbf28
1
Parent(s):
6bfb72c
Update initial welcome state conditions
Browse files
mathtext_fastapi/conversation_manager.py
CHANGED
|
@@ -78,7 +78,7 @@ def generate_message(data_json):
|
|
| 78 |
whatsapp_id = message_data['message']['_vnd']['v1']['chat']['owner'].replace("+","")
|
| 79 |
user_message = message_data['message']['text']['body']
|
| 80 |
|
| 81 |
-
if user_message == '':
|
| 82 |
message_package = {
|
| 83 |
'messages': [],
|
| 84 |
'input_prompt': "Welcome to our math practice. What would you like to try? Type add or subtract.",
|
|
|
|
| 78 |
whatsapp_id = message_data['message']['_vnd']['v1']['chat']['owner'].replace("+","")
|
| 79 |
user_message = message_data['message']['text']['body']
|
| 80 |
|
| 81 |
+
if user_message == '' and context_data['state'] == 'start-conversation':
|
| 82 |
message_package = {
|
| 83 |
'messages': [],
|
| 84 |
'input_prompt': "Welcome to our math practice. What would you like to try? Type add or subtract.",
|