From 160626501fe15cb36c16aa35ce3d4dc9f9946f97 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 29 Jul 2025 10:16:21 -0700 Subject: [PATCH 1/2] Include `message` in converse handling for response routing --- __init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index 419062b..d640711 100644 --- a/__init__.py +++ b/__init__.py @@ -89,7 +89,7 @@ def fallback_llm(self, message): def _threaded_get_response(utt, usr): answer = self._get_llm_response(utt, usr, self._default_llm) if not answer: - LOG.info(f"No fallback response") + LOG.info("No fallback response") return self.speak(answer) @@ -207,7 +207,7 @@ def converse(self, message=None): return False last_message = self.chatting[user][0] if time() - last_message > self.chat_timeout_seconds: - LOG.info(f"Chat session timed out") + LOG.info("Chat session timed out") self._stop_chatting(message) return False # Take final utterance as one that wasn't normalized @@ -216,11 +216,12 @@ def converse(self, message=None): # TODO: Imperfect check for "stop" or "exit" self._stop_chatting(message) return True - Thread(target=self._threaded_converse, args=(utterance, user), + Thread(target=self._threaded_converse, args=(utterance, user, message), daemon=True).start() return True - def _threaded_converse(self, utterance, user): + def _threaded_converse(self, utterance: str, user: str, message: Message): + # `message` required to resolve response routing in `speak` try: llm = self.chatting[user][1] resp = self._get_llm_response(utterance, user, llm) From 5b177549830f4fe3d87d447918734a20b001ad3c Mon Sep 17 00:00:00 2001 From: NeonDaniel Date: Tue, 29 Jul 2025 17:18:39 +0000 Subject: [PATCH 2/2] Update skill.json --- skill.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/skill.json b/skill.json index 8718231..b647ef9 100644 --- a/skill.json +++ b/skill.json @@ -1,6 +1,6 @@ { "title": "LLM Fallback", - "url": "https://github.com/NeonDmitry/skill-fallback_llm_Ua_translate", + "url": "https://github.com/NeonGeckoCom/skill-fallback_llm", "summary": "Get an LLM response from the Neon Diana backend.", "short_description": "Get an LLM response from the Neon Diana backend.", "description": "Converse with an LLM and enable LLM responses when Neon doesn't have a better response. To send a single query to an LLM, you can ask Neon to \"ask Chat GPT \". To start conversing with an LLM, ask to \"talk to Chat GPT\" and have all of your input sent to an LLM until you say goodbye or stop talking for a while. Enable fallback behavior by asking to \"enable LLM fallback skill\" or disable it by asking to \"disable LLM fallback\". To have a copy of LLM interactions sent via email, ask Neon to \"email me a copy of our conversation\".", @@ -41,7 +41,7 @@ "categories": [], "tags": [], "credits": [], - "skillname": "skill-fallback_llm_Ua_translate", - "authorname": "NeonDmitry", + "skillname": "skill-fallback_llm", + "authorname": "NeonGeckoCom", "foldername": null } \ No newline at end of file