Skip to content

Commit

Permalink
Merge pull request #36 from OpenVoiceOS/release-0.1.4a1
Browse files Browse the repository at this point in the history
Release 0.1.4a1
  • Loading branch information
JarbasAl authored Oct 31, 2024
2 parents dba2ada + b489028 commit 8710962
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))



Expand Down
9 changes: 5 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8710962

Please sign in to comment.