mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Softprompt bug fix
This commit is contained in:
@@ -6571,7 +6571,8 @@ def final_startup():
|
|||||||
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 and 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"])
|
if valid_softprompt("softprompts/"+js["softprompt"]):
|
||||||
|
spRequest("softprompts/"+js["softprompt"])
|
||||||
else:
|
else:
|
||||||
koboldai_vars.spfilename = ""
|
koboldai_vars.spfilename = ""
|
||||||
file.close()
|
file.close()
|
||||||
|
Reference in New Issue
Block a user