mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Softprompt Fix
This commit is contained in:
@@ -5965,7 +5965,7 @@ def final_startup():
|
|||||||
if(path.exists("settings/" + getmodelname().replace('/', '_') + ".settings")):
|
if(path.exists("settings/" + getmodelname().replace('/', '_') + ".settings")):
|
||||||
file = open("settings/" + getmodelname().replace('/', '_') + ".settings", "r")
|
file = open("settings/" + getmodelname().replace('/', '_') + ".settings", "r")
|
||||||
js = json.load(file)
|
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 or all(js["softprompt"][0] not in q for q in ("/", "\\")))):
|
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"])
|
spRequest("softprompts/"+js["softprompt"])
|
||||||
else:
|
else:
|
||||||
koboldai_vars.spfilename = ""
|
koboldai_vars.spfilename = ""
|
||||||
|
Reference in New Issue
Block a user