From 94c87c29e2533e35d8c8031bb814b50c6a8a62e4 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:47:03 -0800 Subject: [PATCH] Add `neon_should_respond` context to all emitted Messages (#42) Fix typo in audio input gradio handling Co-authored-by: Daniel McKnight --- neon_iris/client.py | 1 + neon_iris/web_client.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/neon_iris/client.py b/neon_iris/client.py index 9ce374b..639f538 100644 --- a/neon_iris/client.py +++ b/neon_iris/client.py @@ -284,6 +284,7 @@ def _build_message(self, msg_type: str, data: dict, "ident": ident or str(time()), "username": username, "user_profiles": user_profiles, + "neon_should_respond": True, "timing": {}, "mq": {"routing_key": self.uid, "message_id": self.connection.create_unique_id()} diff --git a/neon_iris/web_client.py b/neon_iris/web_client.py index 8fd9eaa..a2e3a52 100644 --- a/neon_iris/web_client.py +++ b/neon_iris/web_client.py @@ -150,7 +150,7 @@ def on_user_input(self, utterance: str, context={"gradio": {"session": gradio_id}, "timing": {"wait_in_queue": in_queue, "gradio_sent": time()}}) - chat_history.append((audio_input, None)) + chat_history.append(((audio_input, None), None)) if not self._await_response.wait(30): LOG.error("No response received after 30s") self._await_response.set()