From 3e1d98432c49f940c806b41e51a5608eaff12110 Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Sun, 1 Aug 2021 21:07:22 +0200 Subject: [PATCH] add adapt matches to data for intents handlers --- jarvis/skills/intent_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jarvis/skills/intent_manager.py b/jarvis/skills/intent_manager.py index 8af21b9..b2a5b09 100644 --- a/jarvis/skills/intent_manager.py +++ b/jarvis/skills/intent_manager.py @@ -91,8 +91,11 @@ def recognise(sentence, client_ip=None, client_port=None): # 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