Browse Source

fixed setup

pull/174/head
jad2121 12 months ago
parent
commit
c8e1c4d2ea
  1. 8
      installer/client/cli/utils.py

8
installer/client/cli/utils.py

@ -38,10 +38,10 @@ class Standalone:
load_dotenv(env_file)
try:
apikey = os.environ["OPENAI_API_KEY"]
self.client = OpenAI()
self.client.api_key = apikey
except KeyError:
print("OPENAI_API_KEY not found in environment variables.")
except:
pass
self.client = OpenAI()
self.client.api_key = apikey
except FileNotFoundError:
print("No API key found. Use the --apikey option to set the key")

Loading…
Cancel
Save