From cff8b3567ffc834e42215f919c6e6d4953a5287b Mon Sep 17 00:00:00 2001 From: PocketMiner82 <73847326+PocketMiner82@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:56:42 +0100 Subject: [PATCH 1/4] fix: the gpt model has no context (#27) * fix: the gpt model has no context * chore: remove debug log message to prevent log spam --- __init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index 0e3c742..021b24c 100644 --- a/__init__.py +++ b/__init__.py @@ -69,12 +69,12 @@ def build_msg_history(self, message): ans = None for m in self.sessions[sess.session_id]: if m[0] == "user": - q = m[1] # track question - if ans is not None: + if ans is not None and q is not None: # save previous q/a pair messages.append((q, ans)) q = None ans = None + q = m[1] # track question elif m[0] == "ai": if ans is None: ans = m[1] # track answer @@ -88,10 +88,11 @@ def build_msg_history(self, message): def _async_ask(self, message): utterance = message.data["utterance"] - self.chat.qa_pairs = self.build_msg_history(message) + chat = self.chat + chat.qa_pairs = self.build_msg_history(message) answered = False try: - for utt in self.chat.stream_utterances(utterance): + for utt in chat.stream_utterances(utterance): answered = True self.speak(utt) except Exception as err: # speak error on any network issue / no credits etc From 4dceb01a161ba8fff85781dc330fff9689af74e6 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:50:43 +0000 Subject: [PATCH 2/4] fix:allow workshop 3.0.0 (#35) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4ffc3b9..363056c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ ovos-solver-openai-persona-plugin>=0.0.0a8 ovos-utils>=0.0.38 -ovos-workshop>=0.0.15,<2.0.0 +ovos-workshop>=0.0.15,<3.0.0 ovos-plugin-manager>=0.0.26,<1.0.0 ovos-translate-server-plugin From a5b0d0423e423e24f501c0d07adef4026d50510a Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 31 Oct 2024 19:50:56 +0000 Subject: [PATCH 3/4] Increment Version to 0.1.4a1 --- version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.py b/version.py index 35edff0..fdf3d6f 100644 --- a/version.py +++ b/version.py @@ -1,6 +1,6 @@ # START_VERSION_BLOCK VERSION_MAJOR = 0 VERSION_MINOR = 1 -VERSION_BUILD = 3 -VERSION_ALPHA = 0 +VERSION_BUILD = 4 +VERSION_ALPHA = 1 # END_VERSION_BLOCK From b489028876c140d10204eaf44998cd1453916ce6 Mon Sep 17 00:00:00 2001 From: JarbasAl Date: Thu, 31 Oct 2024 19:51:15 +0000 Subject: [PATCH 4/4] Update Changelog --- CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 619561e..4c791cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,16 @@ # Changelog -## [0.1.3a1](https://github.com/OpenVoiceOS/skill-ovos-fallback-chatgpt/tree/0.1.3a1) (2024-10-16) +## [0.1.4a1](https://github.com/OpenVoiceOS/skill-ovos-fallback-chatgpt/tree/0.1.4a1) (2024-10-31) -[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-fallback-chatgpt/compare/0.1.2...0.1.3a1) +[Full Changelog](https://github.com/OpenVoiceOS/skill-ovos-fallback-chatgpt/compare/0.1.3...0.1.4a1) + +**Implemented enhancements:** + +- fix: the gpt model has no context [\#27](https://github.com/OpenVoiceOS/skill-ovos-fallback-chatgpt/pull/27) ([PocketMiner82](https://github.com/PocketMiner82)) **Merged pull requests:** -- fix:allow more recent OPM [\#33](https://github.com/OpenVoiceOS/skill-ovos-fallback-chatgpt/pull/33) ([JarbasAl](https://github.com/JarbasAl)) +- fix:allow workshop 3.0.0 [\#35](https://github.com/OpenVoiceOS/skill-ovos-fallback-chatgpt/pull/35) ([JarbasAl](https://github.com/JarbasAl))