From 63121b2b8931b90338eab444a3dfaa5a6c2e9556 Mon Sep 17 00:00:00 2001 From: somebody Date: Sun, 22 Jan 2023 14:54:26 -0600 Subject: [PATCH 1/2] Fix calc_ai_text when no actions are present --- koboldai_settings.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/koboldai_settings.py b/koboldai_settings.py index f633e0c3..5a70cde3 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -331,13 +331,8 @@ class koboldai_vars(object): ######################################### Get Action Text by Sentence ######################################################## 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 - if self.is_chat_v2(): + if action_text_split and self.is_chat_v2(): action_text_split[-1][0] = action_text_split[-1][0].strip() + "\n" ######################################### Prompt ######################################################## From 5162051a794daa854d685c1fe0201e341acb95ea Mon Sep 17 00:00:00 2001 From: somebody Date: Sun, 22 Jan 2023 14:54:48 -0600 Subject: [PATCH 2/2] Ignore apparently squabblish ResizeObserver warnings --- templates/index_new.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/index_new.html b/templates/index_new.html index d1632de0..ff3328a4 100644 --- a/templates/index_new.html +++ b/templates/index_new.html @@ -7,6 +7,7 @@ window.addEventListener('error', function(event) { let fileName = event.filename.split("/").splice(-1)[0]; + if (event.message.includes("ResizeObserver loop completed with undelivered notifications")) return; reportError(`Error at ${fileName}:${event.lineno}`, `${event.message}\n--\nPlease report this error to the developers.`); debug_info.errors.push({msg: event.message, url: event.filename, line: event.lineno}); });