add adapt matches to data for intents handlers

This commit is contained in:
Mathieu B 2021-08-01 21:07:22 +02:00
parent d90079873c
commit 3e1d98432c

View File

@ -91,8 +91,11 @@ def recognise(sentence, client_ip=None, client_port=None):
# print(best_intent) # DEBUG # print(best_intent) # DEBUG
handle(best_intent['intent_type'], data = {'utterance': sentence, 'client_ip': client_ip, 'client_port': client_port}
data={'utterance': sentence, 'client_ip': client_ip, 'client_port': client_port}) for key, val in best_intent.items():
if key != 'intent_type' and key != 'target' and key != 'confidence':
data[key] = val
handle(best_intent['intent_type'], data=data)
return best_intent return best_intent