mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-17 12:10:49 +01:00
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…
x
Reference in New Issue
Block a user