diff --git a/.github/workflows/skill_tests.yml b/.github/workflows/skill_tests.yml index 8153d4a..3630448 100644 --- a/.github/workflows/skill_tests.yml +++ b/.github/workflows/skill_tests.yml @@ -15,9 +15,10 @@ jobs: with: test_padacioso: True test_padatious: True + ovos_versions: "[]" skill_resource_tests: uses: neongeckocom/.github/.github/workflows/skill_test_resources.yml@master skill_install_tests: uses: neongeckocom/.github/.github/workflows/skill_test_installation.yml@master with: - test_osm: false \ No newline at end of file + test_osm: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 80bfd80..5acbeff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,60 +1,20 @@ # Changelog -## [1.0.2a7](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/1.0.2a7) (2025-03-20) +## [2.0.1a2](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/2.0.1a2) (2025-07-29) -[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/1.0.2a6...1.0.2a7) +[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/2.0.1a1...2.0.1a2) **Merged pull requests:** -- Update dependencies [\#27](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/27) ([NeonDaniel](https://github.com/NeonDaniel)) +- Fix response routing for Node and Iris applications [\#30](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/30) ([NeonDaniel](https://github.com/NeonDaniel)) -## [1.0.2a6](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/1.0.2a6) (2025-03-11) +## [2.0.1a1](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/2.0.1a1) (2025-07-23) -[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/1.0.2a5...1.0.2a6) +[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/2.0.0...2.0.1a1) **Merged pull requests:** -- Update automation, gitignore, and license notices [\#26](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/26) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [1.0.2a5](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/1.0.2a5) (2024-09-17) - -[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/1.0.2a4...1.0.2a5) - -**Merged pull requests:** - -- Update OVOS depdendencies for 0.x compat [\#25](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/25) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [1.0.2a4](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/1.0.2a4) (2024-07-18) - -[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/1.0.2a3...1.0.2a4) - -**Merged pull requests:** - -- Update fallback\_llm intents [\#18](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/18) ([NeonClary](https://github.com/NeonClary)) - -## [1.0.2a3](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/1.0.2a3) (2024-03-26) - -[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/1.0.2a2...1.0.2a3) - -**Merged pull requests:** - -- Extend FallbackSkill from ovos-workshop and use Hana endpoints [\#21](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/21) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [1.0.2a2](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/1.0.2a2) (2024-02-05) - -[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/1.0.2a1...1.0.2a2) - -**Merged pull requests:** - -- Support ovos-utils 0.1 [\#20](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/20) ([NeonDaniel](https://github.com/NeonDaniel)) - -## [1.0.2a1](https://github.com/NeonGeckoCom/skill-fallback_llm/tree/1.0.2a1) (2024-01-03) - -[Full Changelog](https://github.com/NeonGeckoCom/skill-fallback_llm/compare/1.0.1...1.0.2a1) - -**Merged pull requests:** - -- Refactor for better compat. with OVOS dependencies [\#19](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/19) ([NeonDaniel](https://github.com/NeonDaniel)) +- Ukraininan translation [\#29](https://github.com/NeonGeckoCom/skill-fallback_llm/pull/29) ([NeonDmitry](https://github.com/NeonDmitry)) 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/locale/uk-ua/dialog/end_chat.dialog b/locale/uk-ua/dialog/end_chat.dialog new file mode 100644 index 0000000..96adcbf --- /dev/null +++ b/locale/uk-ua/dialog/end_chat.dialog @@ -0,0 +1 @@ +Приємно було спілкуватися з вами, до побачення. diff --git a/locale/uk-ua/dialog/fallback_disabled.dialog b/locale/uk-ua/dialog/fallback_disabled.dialog new file mode 100644 index 0000000..829875d --- /dev/null +++ b/locale/uk-ua/dialog/fallback_disabled.dialog @@ -0,0 +1 @@ +Гаразд, я не буду надсилати запити до LLM. diff --git a/locale/uk-ua/dialog/fallback_enabled.dialog b/locale/uk-ua/dialog/fallback_enabled.dialog new file mode 100644 index 0000000..1a0e440 --- /dev/null +++ b/locale/uk-ua/dialog/fallback_enabled.dialog @@ -0,0 +1 @@ +Гаразд, я буду звертатися до LLM, коли не матиму кращої відповіді diff --git a/locale/uk-ua/dialog/no_chat_history.dialog b/locale/uk-ua/dialog/no_chat_history.dialog new file mode 100644 index 0000000..b22ea3e --- /dev/null +++ b/locale/uk-ua/dialog/no_chat_history.dialog @@ -0,0 +1 @@ +У мене немає історії чату, щоб надіслати вам. diff --git a/locale/uk-ua/dialog/no_chatgpt.dialog b/locale/uk-ua/dialog/no_chatgpt.dialog new file mode 100644 index 0000000..b957e8e --- /dev/null +++ b/locale/uk-ua/dialog/no_chatgpt.dialog @@ -0,0 +1 @@ +Вибачте, Chat GPT зараз недоступний. diff --git a/locale/uk-ua/dialog/no_email_address.dialog b/locale/uk-ua/dialog/no_email_address.dialog new file mode 100644 index 0000000..1033954 --- /dev/null +++ b/locale/uk-ua/dialog/no_email_address.dialog @@ -0,0 +1 @@ +Вибачте, будь ласка, вкажіть вашу електронну адресу і спробуйте знову. diff --git a/locale/uk-ua/dialog/notify_llm_active.dialog b/locale/uk-ua/dialog/notify_llm_active.dialog new file mode 100644 index 0000000..294affe --- /dev/null +++ b/locale/uk-ua/dialog/notify_llm_active.dialog @@ -0,0 +1 @@ +Спілкування з LLM. Скажіть "до побачення", щоб завершити. diff --git a/locale/uk-ua/dialog/sending_chat_history.dialog b/locale/uk-ua/dialog/sending_chat_history.dialog new file mode 100644 index 0000000..59493fc --- /dev/null +++ b/locale/uk-ua/dialog/sending_chat_history.dialog @@ -0,0 +1 @@ +Гаразд, я надішлю стенограму нашої розмови на вашу електронну адресу {{email}}. diff --git a/locale/uk-ua/dialog/start_chat.dialog b/locale/uk-ua/dialog/start_chat.dialog new file mode 100644 index 0000000..ca88f1f --- /dev/null +++ b/locale/uk-ua/dialog/start_chat.dialog @@ -0,0 +1 @@ +Гаразд, тепер ви спілкуєтеся з {{llm}}. Ця розмова завершиться після {{timeout}} неактивності, або ви можете сказати 'до побачення', коли закінчите. diff --git a/locale/uk-ua/intent/ask_llm.intent b/locale/uk-ua/intent/ask_llm.intent new file mode 100644 index 0000000..5e6930c --- /dev/null +++ b/locale/uk-ua/intent/ask_llm.intent @@ -0,0 +1 @@ +(запитай|скажи|попроси|задай питання|запитати|спитай|дізнайся у) (chatgpt|chat gpt|chat g p t|chat gpg|chat gptc|jackgpt|jack gpt|чат gpt|чатgpt|штучний інтелект|мовну модель|llm) {question} diff --git a/locale/uk-ua/intent/chat_with_llm.intent b/locale/uk-ua/intent/chat_with_llm.intent new file mode 100644 index 0000000..53456ca --- /dev/null +++ b/locale/uk-ua/intent/chat_with_llm.intent @@ -0,0 +1 @@ +(я хочу |)(поспілкуватися|поговорити|почати розмову|спілкуватися) (з|із) (chatgpt|chat gpt|chat g p t|chat gpg|chat gptc|jackgpt|jack gpt|чат gpt|чатgpt|штучним інтелектом|мовною моделлю|llm) diff --git a/locale/uk-ua/intent/disable_fallback.intent b/locale/uk-ua/intent/disable_fallback.intent new file mode 100644 index 0000000..5e47974 --- /dev/null +++ b/locale/uk-ua/intent/disable_fallback.intent @@ -0,0 +1 @@ +вимкнути (резервний|запасний|аварійний) (навик|скіл|) (llm|chatgpt|chat gpt|chat g p t|chat gpg|chat gptc|jackgpt|jack gpt|чат gpt|чатgpt|штучний інтелект|мовну модель) diff --git a/locale/uk-ua/intent/email_chat_history.intent b/locale/uk-ua/intent/email_chat_history.intent new file mode 100644 index 0000000..6981eac --- /dev/null +++ b/locale/uk-ua/intent/email_chat_history.intent @@ -0,0 +1,3 @@ +(надішли|відправ) мені (копію |стенограму |розшифровку |)(цієї|моєї|вашої|нашої|тієї|нашого) (бесіди|розмови|чату) +надішли мені нашу розмову +(надішли|відправ) мені (історію|) (бесіди|розмови|чату) diff --git a/locale/uk-ua/intent/enable_fallback.intent b/locale/uk-ua/intent/enable_fallback.intent new file mode 100644 index 0000000..4e255b8 --- /dev/null +++ b/locale/uk-ua/intent/enable_fallback.intent @@ -0,0 +1 @@ +увімкнути (резервний|запасний|аварійний) (навик|скіл|) (llm|chatgpt|chat gpt|chat g p t|chat gpg|chat gptc|jackgpt|jack gpt|чат gpt|чатgpt|штучний інтелект|мовну модель) diff --git a/locale/uk-ua/intent/llm.entity b/locale/uk-ua/intent/llm.entity new file mode 100644 index 0000000..82ebe3f --- /dev/null +++ b/locale/uk-ua/intent/llm.entity @@ -0,0 +1,16 @@ +chatgpt +chat gpt +chat g p t +chat gpg +chat gptc +jackgpt +jack gpt +jack chi pt +chat gbt +chatgbt +chat gpt4 +chatgpt4 +чатgpt +чат gpt +штучний інтелект +мовна модель diff --git a/locale/uk-ua/vocab/chat_gpt.voc b/locale/uk-ua/vocab/chat_gpt.voc new file mode 100644 index 0000000..2ad85fe --- /dev/null +++ b/locale/uk-ua/vocab/chat_gpt.voc @@ -0,0 +1,18 @@ +chatgpt +chat gpt +chat g p t +chat gpg +chat gptc +jackgpt +jack gpt +jack chi pt +chat gbt +chatgbt +chat gpt4 +chatgpt4 +чатgpt +чат gpt +чат жпт +чат джпт +штучний інтелект +мовна модель diff --git a/locale/uk-ua/vocab/exit.voc b/locale/uk-ua/vocab/exit.voc new file mode 100644 index 0000000..d3a5ba9 --- /dev/null +++ b/locale/uk-ua/vocab/exit.voc @@ -0,0 +1,8 @@ +до побачення +до зустрічі +бувай +вийти +стоп +іди геть +закінчити +припини diff --git a/locale/uk-ua/vocab/fastchat.voc b/locale/uk-ua/vocab/fastchat.voc new file mode 100644 index 0000000..757dbad --- /dev/null +++ b/locale/uk-ua/vocab/fastchat.voc @@ -0,0 +1,3 @@ +швидкийчат +швидкий чат +швидка розмова diff --git a/test/test_intents.yaml b/test/test_intents.yaml index cfbf8f0..08f7914 100644 --- a/test/test_intents.yaml +++ b/test/test_intents.yaml @@ -48,6 +48,33 @@ en-us: - email me a copy of our conversation - send me a transcript of our chat +uk-ua: + ask_llm.intent: + - запитай чат gpt що таке парасолька: + - question: що таке парасолька + - скажи chatgpt що мене звати неон: + - question: що мене звати неон + chat_with_llm.intent: + - поспілкуватися з чат gpt +# - llm: чат gpt + - поговорити з chatgpt +# - llm: chatgpt + - почати розмову з штучним інтелектом +# - llm: штучним інтелектом + - спілкуватися з мовною моделлю +# - llm: мовною моделлю + - я хочу поговорити з чат gpt +# - llm: чат gpt + enable_fallback.intent: + - увімкнути резервний навик chat gpt + disable_fallback.intent: + - вимкнути запасний навик чат gpt + email_chat_history.intent: + - надішли мені нашу розмову + - відправ мені історію чату + - надішли мені копію нашої бесіди + - відправ мені стенограму нашого чату + unmatched intents: en-us: - ask neon what time it is @@ -58,4 +85,14 @@ unmatched intents: - email me a support ticket - talk to me faster - talk to me slower - - talk to me normally \ No newline at end of file + - talk to me normally + uk-ua: + - запитай неон котра година + - розкажи мені про каміння + - увімкнути команди пробудження + - вимкнути підтвердження прослуховування + - надішли мені електронний лист + - відправ мені квиток підтримки + - говори зі мною швидше + - говори зі мною повільніше + - говори зі мною нормально \ No newline at end of file diff --git a/version.py b/version.py index 5f30d52..61a5c54 100644 --- a/version.py +++ b/version.py @@ -26,4 +26,4 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -__version__ = "2.0.0" +__version__ = "2.1.0"