From 2ed9cb4db2a710999e8def9126ffb4cbc4532528 Mon Sep 17 00:00:00 2001 From: ebolam Date: Mon, 29 Aug 2022 12:35:56 -0400 Subject: [PATCH] Softprompt bug fix --- aiserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index 46ce0372..3fae32c6 100644 --- a/aiserver.py +++ b/aiserver.py @@ -6571,7 +6571,8 @@ def final_startup(): file = open("settings/" + getmodelname().replace('/', '_') + ".settings", "r") js = json.load(file) if(koboldai_vars.allowsp and "softprompt" in js and type(js["softprompt"]) is str and all(q not in js["softprompt"] for q in ("..", ":")) and (len(js["softprompt"]) != 0 and all(js["softprompt"][0] not in q for q in ("/", "\\")))): - spRequest("softprompts/"+js["softprompt"]) + if valid_softprompt("softprompts/"+js["softprompt"]): + spRequest("softprompts/"+js["softprompt"]) else: koboldai_vars.spfilename = "" file.close()