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