Bugfix: Check for keys in client.settings before attempting to access
This commit is contained in:
parent
ba1ba0fc8a
commit
739a8a5268
10
aiserver.py
10
aiserver.py
|
@ -401,15 +401,19 @@ def loadsettings():
|
|||
js = json.load(file)
|
||||
|
||||
# Copy file contents to vars
|
||||
#for set in js:
|
||||
# vars[set] = js[set]
|
||||
vars.apikey = js["apikey"]
|
||||
if("andepth" in js):
|
||||
vars.andepth = js["andepth"]
|
||||
if("temp" in js):
|
||||
vars.temp = js["temp"]
|
||||
if("top_p" in js):
|
||||
vars.top_p = js["top_p"]
|
||||
if("rep_pen" in js):
|
||||
vars.rep_pen = js["rep_pen"]
|
||||
if("genamt" in js):
|
||||
vars.genamt = js["genamt"]
|
||||
if("max_length" in js):
|
||||
vars.max_length = js["max_length"]
|
||||
if("ikgen" in js):
|
||||
vars.ikgen = js["ikgen"]
|
||||
|
||||
file.close()
|
||||
|
|
Loading…
Reference in New Issue