mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
allow kcppt for config switching
This commit is contained in:
parent
15ae98c9cd
commit
6fa50f78bf
1 changed files with 2 additions and 2 deletions
|
@ -2408,7 +2408,7 @@ Enter Prompt:<br>
|
||||||
opts = []
|
opts = []
|
||||||
if args.admin and args.admindir and os.path.exists(args.admindir) and self.check_header_password(args.adminpassword):
|
if args.admin and args.admindir and os.path.exists(args.admindir) and self.check_header_password(args.adminpassword):
|
||||||
dirpath = os.path.abspath(args.admindir)
|
dirpath = os.path.abspath(args.admindir)
|
||||||
opts = [f for f in sorted(os.listdir(dirpath)) if f.endswith(".kcpps") and os.path.isfile(os.path.join(dirpath, f))]
|
opts = [f for f in sorted(os.listdir(dirpath)) if (f.endswith(".kcpps") or f.endswith(".kcppt")) and os.path.isfile(os.path.join(dirpath, f))]
|
||||||
response_body = (json.dumps(opts).encode())
|
response_body = (json.dumps(opts).encode())
|
||||||
|
|
||||||
elif self.path.endswith(('/api/extra/perf')):
|
elif self.path.endswith(('/api/extra/perf')):
|
||||||
|
@ -2780,7 +2780,7 @@ Enter Prompt:<br>
|
||||||
if targetfile and targetfile!="":
|
if targetfile and targetfile!="":
|
||||||
dirpath = os.path.abspath(args.admindir)
|
dirpath = os.path.abspath(args.admindir)
|
||||||
targetfilepath = os.path.join(dirpath, targetfile)
|
targetfilepath = os.path.join(dirpath, targetfile)
|
||||||
opts = [f for f in os.listdir(dirpath) if f.endswith(".kcpps") and os.path.isfile(os.path.join(dirpath, f))]
|
opts = [f for f in os.listdir(dirpath) if (f.endswith(".kcpps") or f.endswith(".kcppt")) and os.path.isfile(os.path.join(dirpath, f))]
|
||||||
if targetfile in opts and os.path.exists(targetfilepath):
|
if targetfile in opts and os.path.exists(targetfilepath):
|
||||||
print(f"Admin: Received request to reload config to {targetfile}")
|
print(f"Admin: Received request to reload config to {targetfile}")
|
||||||
global_memory["restart_target"] = targetfile
|
global_memory["restart_target"] = targetfile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue