Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report VisualMatchLevel to Common Query #73

Open
wants to merge 1 commit into
base: 21.02
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down