Skip to content

Commit

Permalink
fix/converse_intents_no_match (#193)
Browse files Browse the repository at this point in the history
"conf" key is not available when padacioso doesn't return any match

{'name': None, 'entities': {}}
  • Loading branch information
JarbasAl authored Mar 22, 2024
1 parent 86efed6 commit 994eff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down

0 comments on commit 994eff1

Please sign in to comment.