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) 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