Fix for new chat mode UI

This commit is contained in:
ebolam
2022-11-19 18:12:57 -05:00
parent 25826c6169
commit 308417da39

View File

@@ -208,6 +208,7 @@ class koboldai_vars(object):
return "" return ""
return [], 0, 0+self.genamt, [] return [], 0, 0+self.genamt, []
if self.alt_gen: if self.alt_gen:
method = 2 method = 2
else: else:
@@ -276,6 +277,11 @@ class koboldai_vars(object):
######################################### Get Action Text by Sentence ######################################################## ######################################### Get Action Text by Sentence ########################################################
action_text_split = self.actions.to_sentences(submitted_text=submitted_text) action_text_split = self.actions.to_sentences(submitted_text=submitted_text)
if action_text_split == []:
if return_text:
return ""
return [], 0, 0+self.genamt, []
# Always add newlines on chat v2 # Always add newlines on chat v2
if self.is_chat_v2(): if self.is_chat_v2():
action_text_split[-1][0] = action_text_split[-1][0].strip() + "\n" action_text_split[-1][0] = action_text_split[-1][0].strip() + "\n"