From 2317b50ebe33cc6fa603790f40154e53c8ea214c Mon Sep 17 00:00:00 2001 From: Kris Gesling Date: Fri, 5 Nov 2021 13:44:43 +0930 Subject: [PATCH] Report VisualMatchLevel to Common Query CQSVisualMatchLevel provides a small bonus to the match confidence if the platform has a GUI connected. --- __init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 0a9d097..b58d35e 100755 --- a/__init__.py +++ b/__init__.py @@ -18,7 +18,7 @@ from requests.exceptions import ConnectionError, ReadTimeout from mycroft import AdaptIntent, intent_handler -from mycroft.skills.common_query_skill import CommonQuerySkill, CQSMatchLevel +from mycroft.skills.common_query_skill import CommonQuerySkill, CQSVisualMatchLevel from .wiki import Wiki, DisambiguationError, MediaWikiPage @@ -158,7 +158,7 @@ def handle_tell_more(self, message): else: self.speak_dialog("thats all") - def CQS_match_query_phrase(self, query: str) -> tuple([str, CQSMatchLevel, str, dict]): + def CQS_match_query_phrase(self, query: str) -> tuple([str, CQSVisualMatchLevel, str, dict]): """Respond to Common Query framework with best possible answer. Args: @@ -188,7 +188,7 @@ def CQS_match_query_phrase(self, query: str) -> tuple([str, CQSMatchLevel, str, self._cqs_match = Article(page.title, page, answer, num_lines) if answer: self.schedule_event(self.get_cqs_match_image, 0) - return (query, CQSMatchLevel.CATEGORY, answer, callback_data) + return (query, CQSVisualMatchLevel.CATEGORY, answer, callback_data) return answer def CQS_action(self, phrase: str, data: dict):