Skip to content

Commit

Permalink
fix/dont split numbers (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Jun 19, 2024
1 parent bb88b47 commit 76bc3fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ovos_solver_openai_persona/engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ def stream_utterances(self, query):
for chunk in self._do_streaming_api_request(messages):
answer += chunk
if any(chunk.endswith(p) for p in [".", "!", "?", "\n", ":"]):
if chunk[-2].isdigit() and chunk[-1] == ".":
continue # dont split numbers
if answer.strip():
yield answer
answer = ""
Expand Down

0 comments on commit 76bc3fc

Please sign in to comment.