From c8e1c4d2ea27a29361d1a8cb4db5250f079e6856 Mon Sep 17 00:00:00 2001 From: jad2121 Date: Wed, 6 Mar 2024 19:56:24 -0500 Subject: [PATCH] fixed setup --- installer/client/cli/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/client/cli/utils.py b/installer/client/cli/utils.py index 37b7245..f50299b 100644 --- a/installer/client/cli/utils.py +++ b/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")