From 994eff100aeccbe4015f8146cfeee5353ebe7efb Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Fri, 22 Mar 2024 03:07:23 +0000 Subject: [PATCH] fix/converse_intents_no_match (#193) "conf" key is not available when padacioso doesn't return any match {'name': None, 'entities': {}} --- ovos_workshop/skills/ovos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovos_workshop/skills/ovos.py b/ovos_workshop/skills/ovos.py index 8af6bb7b..b665827a 100644 --- a/ovos_workshop/skills/ovos.py +++ b/ovos_workshop/skills/ovos.py @@ -271,7 +271,7 @@ def _handle_converse_intents(self, message): for utt in message.data['utterances']: match = self.converse_matchers[self.lang].calc_intent(utt) - if match and match["conf"] > best_score: + if match.get("conf", 0) > best_score: best_score = match["conf"] response = message.forward(match["name"], match["entities"])