mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Merge pull request #305 from SillyLossy/united
Fix setting softprompt via V1 API
This commit is contained in:
@@ -10510,7 +10510,7 @@ def soft_prompt_validator(soft_prompt: str):
|
||||
raise ValidationError("Cannot use soft prompts with current backend.")
|
||||
if any(q in soft_prompt for q in ("/", "\\")):
|
||||
return
|
||||
z, _, _, _, _ = fileops.checksp(soft_prompt.strip(), koboldai_vars.modeldim)
|
||||
z, _, _, _, _ = fileops.checksp("./softprompts/"+soft_prompt.strip(), koboldai_vars.modeldim)
|
||||
if isinstance(z, int):
|
||||
raise ValidationError("Must be a valid soft prompt name.")
|
||||
z.close()
|
||||
|
Reference in New Issue
Block a user