From dfac136b7b264726b2ed6cfae309da9584796559 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Tue, 21 Nov 2023 22:23:43 +0000 Subject: [PATCH] fix/get_response_session (#149) --- ovos_workshop/skills/ovos.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ovos_workshop/skills/ovos.py b/ovos_workshop/skills/ovos.py index 5b1c00a8..33a3d406 100644 --- a/ovos_workshop/skills/ovos.py +++ b/ovos_workshop/skills/ovos.py @@ -1702,6 +1702,8 @@ def get_response(self, dialog: str = '', data: Optional[dict] = None, data = data or {} session = SessionManager.get(message) + session.enable_response_mode(self.skill_id) + message.context["session"] = session.serialize() self.__responses[session.session_id] = [] self.bus.emit(message.forward("skill.converse.get_response.enable", {"skill_id": self.skill_id})) @@ -1743,6 +1745,9 @@ def validator_default(utterance): # from the killable thread and returns the answer ans = self._wait_response(is_cancel, validator, on_fail_fn, num_retries, message) + + session.disable_response_mode(self.skill_id) + message.context["session"] = session.serialize() self.bus.emit(message.forward("skill.converse.get_response.disable", {"skill_id": self.skill_id})) return ans