mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Chat mode cleanup
This commit is contained in:
7
utils.py
7
utils.py
@@ -92,8 +92,7 @@ def trimincompletesentence(txt):
|
||||
#
|
||||
#==================================================================#
|
||||
def replaceblanklines(txt):
|
||||
txt = txt.replace("\n\n", "\n")
|
||||
return txt
|
||||
return txt.replace("\n\n", "\n")
|
||||
|
||||
#==================================================================#
|
||||
#
|
||||
@@ -131,8 +130,8 @@ def addsentencespacing(txt, koboldai_vars):
|
||||
def singlelineprocessing(txt, koboldai_vars):
|
||||
txt = koboldai_vars.regex_sl.sub('', txt)
|
||||
if(len(koboldai_vars.actions) > 0):
|
||||
if(len(koboldai_vars.actions[koboldai_vars.actions.get_last_key()]) > 0):
|
||||
action = koboldai_vars.actions[koboldai_vars.actions.get_last_key()]
|
||||
if(len(koboldai_vars.actions[-1]) > 0):
|
||||
action = koboldai_vars.actions[-1]
|
||||
lastchar = action[-1] if len(action) else ""
|
||||
else:
|
||||
# Last action is blank, this should never happen, but
|
||||
|
Reference in New Issue
Block a user