Greg Thompson commited on
Commit
6335789
1 Parent(s): 8571e25

Add an exit state

Browse files
mathtext_fastapi/conversation_manager.py CHANGED
@@ -103,6 +103,14 @@ def generate_message(data_json):
103
  'input_prompt': "Here's the first one... What's 3-1?",
104
  'state': "subtract-question-sequence"
105
  }
 
 
 
 
 
 
 
 
106
  else:
107
  message_package = {
108
  'messages': [
 
103
  'input_prompt': "Here's the first one... What's 3-1?",
104
  'state': "subtract-question-sequence"
105
  }
106
+ elif user_message == 'exit':
107
+ message_package = {
108
+ 'messages': [
109
+ "Great, thanks for practicing math today. Come back any time."
110
+ ],
111
+ 'input_prompt': "",
112
+ 'state': "exit"
113
+ }
114
  else:
115
  message_package = {
116
  'messages': [