From 0b113a75b4c97b13448934490918144b58cbbc65 Mon Sep 17 00:00:00 2001 From: KoboldAI Dev Date: Thu, 13 May 2021 09:35:11 -0400 Subject: [PATCH] Hotfix for tokenizer modifying spaced ellipses and breaking new text recognition. --- aiserver.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index 07f2ec55..d6899488 100644 --- a/aiserver.py +++ b/aiserver.py @@ -701,7 +701,12 @@ def getnewcontent(txt): else: delim = vars.actions[-1] - return (txt.split(delim)[-1]) + # Fix issue with tokenizer replacing space+period with period + delim = delim.replace(" .", ".") + + split = txt.split(delim) + + return (split[-1]) #==================================================================# # Applies chosen formatting options to text submitted to AI