Greg Thompson commited on
Commit
e0470d3
1 Parent(s): 39df6cb

Update user's message text type

Browse files
Files changed (1) hide show
  1. mathtext_fastapi/nlu.py +2 -2
mathtext_fastapi/nlu.py CHANGED
@@ -144,14 +144,14 @@ def evaluate_message_with_nlu(message_data):
144
  'message_inserted_at': message_data['message']['_vnd']['v1']['chat']['inserted_at'],
145
  'message_updated_at': message_data['message']['_vnd']['v1']['chat']['updated_at'],
146
  }
147
- message_text = message_data['message_body']
148
 
149
  # Run intent classification only for keywords
150
  intent_api_response = run_intent_classification(message_text)
151
  if intent_api_response['data']:
152
  return intent_api_response
153
 
154
- number_api_resp = text2int(message_text)
155
 
156
  if number_api_resp == 32202:
157
  # Run intent classification with logistic regression model
 
144
  'message_inserted_at': message_data['message']['_vnd']['v1']['chat']['inserted_at'],
145
  'message_updated_at': message_data['message']['_vnd']['v1']['chat']['updated_at'],
146
  }
147
+ message_text = str(message_data['message_body'])
148
 
149
  # Run intent classification only for keywords
150
  intent_api_response = run_intent_classification(message_text)
151
  if intent_api_response['data']:
152
  return intent_api_response
153
 
154
+ number_api_resp = text2int(message_text.lower())
155
 
156
  if number_api_resp == 32202:
157
  # Run intent classification with logistic regression model