Skip to content

Commit 7cff470

Browse files
authored
Merge pull request #18 from OpenVoiceOS/release-1.1.2a1
Release 1.1.2a1
2 parents 08f9c7c + 7fcacff commit 7cff470

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Changelog
22

3-
## [1.1.1a1](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/tree/1.1.1a1) (2025-01-31)
3+
## [1.1.2a1](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/tree/1.1.2a1) (2025-01-31)
44

5-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/compare/V1.1.0...1.1.1a1)
5+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/compare/V1.1.1...1.1.2a1)
66

77
**Merged pull requests:**
88

9-
- update base class to use the new ChatMessageSolver api [\#15](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/pull/15) ([JarbasAl](https://github.com/JarbasAl))
9+
- fix:text post processing [\#17](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/pull/17) ([JarbasAl](https://github.com/JarbasAl))
1010

11-
## [V1.1.0](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/tree/V1.1.0) (2024-11-13)
11+
## [V1.1.1](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/tree/V1.1.1) (2025-01-31)
1212

13-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/compare/1.1.0...V1.1.0)
13+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-solver-openai-persona-plugin/compare/1.1.1...V1.1.1)
1414

1515

1616

ovos_solver_openai_persona/engines.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ def get_spoken_answer(self, query: str,
7272
return answer
7373

7474

75+
def post_process_sentence(text: str) -> str:
76+
text = text.replace("*", "") # TTS often literally reads "asterisk"
77+
return text.strip()
78+
79+
7580
class OpenAIChatCompletionsSolver(ChatMessageSolver):
7681
enable_tx = False
7782
priority = 25
@@ -186,7 +191,7 @@ def continue_chat(self, messages: MessageList,
186191
Optional[str]: The generated response or None if no response could be generated.
187192
"""
188193
response = self._do_api_request(messages)
189-
answer = response.strip()
194+
answer = post_process_sentence(response)
190195
if not answer or not answer.strip("?") or not answer.strip("_"):
191196
return None
192197
if self.memory:
@@ -222,7 +227,7 @@ def stream_chat_utterances(self, messages: List[Dict[str, str]],
222227
if self.memory:
223228
full_ans = f"{self.qa_pairs[-1][-1]}\n{answer}".strip()
224229
self.qa_pairs[-1] = (query, full_ans)
225-
yield answer
230+
yield post_process_sentence(answer)
226231
answer = ""
227232

228233
def stream_utterances(self, query: str,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# START_VERSION_BLOCK
22
VERSION_MAJOR = 1
33
VERSION_MINOR = 1
4-
VERSION_BUILD = 1
5-
VERSION_ALPHA = 0
4+
VERSION_BUILD = 2
5+
VERSION_ALPHA = 1
66
# END_VERSION_BLOCK

0 commit comments

Comments
 (0)