mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
fixed saving path for savedata
This commit is contained in:
parent
0cfd8d23cb
commit
ddaa8d5a38
1 changed files with 2 additions and 2 deletions
|
@ -2812,8 +2812,8 @@ Enter Prompt:<br>
|
||||||
savedata_obj.pop(str(slotid))
|
savedata_obj.pop(str(slotid))
|
||||||
saveneeded = True
|
saveneeded = True
|
||||||
if saveneeded:
|
if saveneeded:
|
||||||
if args.savedatafile and os.path.exists(args.savedatafile):
|
if args.savedatafile and os.path.exists(os.path.abspath(args.savedatafile)):
|
||||||
with open(args.savedatafile, 'w+', encoding='utf-8', errors='ignore') as f:
|
with open(os.path.abspath(args.savedatafile), 'w+', encoding='utf-8', errors='ignore') as f:
|
||||||
json.dump(savedata_obj, f)
|
json.dump(savedata_obj, f)
|
||||||
print(f"Data was saved to slot {slotid}")
|
print(f"Data was saved to slot {slotid}")
|
||||||
response_body = (json.dumps({"success":True, "error":""}).encode())
|
response_body = (json.dumps({"success":True, "error":""}).encode())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue