Merge pull request #77 from VE-FORBRYDERNE/patch
Create settings directory if it doesn't exist when using InferKit/OAI
This commit is contained in:
commit
c59673efde
|
@ -276,6 +276,7 @@ if(vars.model == "InferKit"):
|
|||
print("{0}Please enter your InferKit API key:{1}\n".format(colors.CYAN, colors.END))
|
||||
vars.apikey = input("Key> ")
|
||||
# Write API key to file
|
||||
os.makedirs('settings', exist_ok=True)
|
||||
file = open("settings/" + getmodelname() + ".settings", "w")
|
||||
try:
|
||||
js = {"apikey": vars.apikey}
|
||||
|
@ -310,6 +311,7 @@ if(vars.model == "OAI"):
|
|||
print("{0}Please enter your OpenAI API key:{1}\n".format(colors.CYAN, colors.END))
|
||||
vars.oaiapikey = input("Key> ")
|
||||
# Write API key to file
|
||||
os.makedirs('settings', exist_ok=True)
|
||||
file = open("settings/" + getmodelname() + ".settings", "w")
|
||||
try:
|
||||
js = {"oaiapikey": vars.oaiapikey}
|
||||
|
|
Loading…
Reference in New Issue