From 51d509bafb78fd245a404d8b2dc1af25d335bf0d Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 6 Mar 2024 13:18:17 -0800 Subject: [PATCH] Update config.py --- backend/config.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backend/config.py b/backend/config.py index 8373dc12d..264fab465 100644 --- a/backend/config.py +++ b/backend/config.py @@ -237,6 +237,19 @@ OPENAI_API_BASE_URL = os.environ.get("OPENAI_API_BASE_URL", "") if OPENAI_API_BASE_URL == "": OPENAI_API_BASE_URL = "https://api.openai.com/v1" +OPENAI_API_KEYS = os.environ.get("OPENAI_API_KEYS", "") +OPENAI_API_KEYS = OPENAI_API_KEYS if OPENAI_API_KEYS != "" else OPENAI_API_KEY + +OPENAI_API_KEYS = [url.strip() for url in OPENAI_API_BASE_URL.split(";")] + + +OPENAI_API_BASE_URLS = os.environ.get("OPENAI_API_BASE_URLS", "") +OPENAI_API_BASE_URLS = ( + OPENAI_API_BASE_URLS if OPENAI_API_BASE_URLS != "" else OPENAI_API_BASE_URL +) + +OPENAI_API_BASE_URLS = [url.strip() for url in OPENAI_API_BASE_URL.split(";")] + #################################### # WEBUI