Bugfixes:

Improvements to pruning context from text returned from the AI
Colab errors should no longer throw JSON decode errors in client
Improved logic for World Info scanning
Fix for index error in addsentencespacing
This commit is contained in:
KoboldAI Dev
2021-05-18 17:59:59 -04:00
parent 3d070f057e
commit 4996e0ff46
2 changed files with 65 additions and 31 deletions

View File

@ -69,7 +69,12 @@ def removespecialchars(txt):
def addsentencespacing(txt, vars):
# Get last character of last action
if(len(vars.actions) > 0):
lastchar = vars.actions[-1][-1]
if(len(vars.actions[-1]) > 0):
lastchar = vars.actions[-1][-1]
else:
# Last action is blank, this should never happen, but
# since it did let's bail out.
return txt
else:
lastchar = vars.prompt[-1]
if(lastchar == "." or lastchar == "!" or lastchar == "?" or lastchar == "," or lastchar == ";" or lastchar == ":"):