Fix chat mode empty generation error

This commit is contained in:
0cc4m
2023-05-08 22:56:17 +02:00
parent e55a9d31c2
commit 4f94247910

View File

@@ -714,7 +714,7 @@ def applyoutputformatting(txt, no_sentence_trimming=False, no_single_line=False)
txt = replaceblanklines(txt)
# trim off starting new lines in replies if we're in chat mode
if koboldai_vars.chatmode and txt[0] == "\n":
if koboldai_vars.chatmode and txt and txt[0] == "\n":
txt = txt[1:]
# Remove special characters