Skip to content

Commit

Permalink
Fix ovos-core 0.0.8 Common Query compat. (#523)
Browse files Browse the repository at this point in the history
* Troubleshooting ovos-core 0.0.8 CommonQuery compat.

* Troubleshooting ovos-core 0.0.8 CommonQuery compat.

* Cleanup changes to match upstream ovos-workshop

---------

Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored May 10, 2024
1 parent 1c78366 commit b626123
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neon_utils/skills/common_query_skill.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def handles_visuals(platform):
return platform in VISUAL_DEVICES


# TODO: Consider deprecation and implementing ovos_workshop directly
class CommonQuerySkill(NeonSkill, _CQS):
"""Question answering skills should be based on this class.
Expand Down Expand Up @@ -168,6 +167,8 @@ def __handle_query_action(self, message):
data = message.data.get("callback_data") or {}
if data.get("answer"):
self.speak(data["answer"])
else:
LOG.error(f"no answer provided in: {message.data.keys()}")
# Invoke derived class to provide playback data
self.CQS_action(phrase, data)
self.bus.emit(message.forward("mycroft.skill.handler.complete",
Expand All @@ -191,6 +192,7 @@ def __handle_question_query(self, message):
level = result[1]
answer = result[2]
callback = result[3] if len(result) > 3 else None
callback["answer"] = answer
confidence = self.__calc_confidence(match, search_phrase, level)
self.bus.emit(message.response({"phrase": search_phrase,
"skill_id": self.skill_id,
Expand Down

0 comments on commit b626123

Please sign in to comment.