mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
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:
7
utils.py
7
utils.py
@ -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 == ":"):
|
||||
|
Reference in New Issue
Block a user