From 3ec374479227c6d5f09af8fc8b1f464b550e90bb Mon Sep 17 00:00:00 2001 From: ebolam Date: Mon, 17 Oct 2022 19:29:54 -0400 Subject: [PATCH] skip WI matches on no text --- koboldai_settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koboldai_settings.py b/koboldai_settings.py index 9180ef63..b384ddbe 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -1144,6 +1144,8 @@ class KoboldStoryRegister(object): action = self.actions[action_id]['wi_highlighted_text'] else: action = self.story_settings.prompt_wi_highlighted_text + if action['text'] == "": + return i=0 while i < len(action): if action[i]['WI matches'] is None and key in action[i]['text']: