From 38321355d3476657126e0386b494fcdf517b20fb Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 20 Apr 2024 20:37:18 -0500 Subject: [PATCH] fix --- backend/config.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/config.py b/backend/config.py index 6ca2c67b..fb9063eb 100644 --- a/backend/config.py +++ b/backend/config.py @@ -322,9 +322,14 @@ OPENAI_API_BASE_URLS = [ ] OPENAI_API_KEY = "" -OPENAI_API_KEY = OPENAI_API_KEYS[ - OPENAI_API_BASE_URLS.index("https://api.openai.com/v1") -] + +try: + OPENAI_API_KEY = OPENAI_API_KEYS[ + OPENAI_API_BASE_URLS.index("https://api.openai.com/v1") + ] +except: + pass + OPENAI_API_BASE_URL = "https://api.openai.com/v1"