From ded22b3204794217be713cbcc6771498745bd3a3 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 21 Oct 2024 00:40:01 -0700 Subject: [PATCH] refac: do not check for empty keys --- backend/open_webui/apps/openai/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/open_webui/apps/openai/main.py b/backend/open_webui/apps/openai/main.py index dbdf9911d..3647977ca 100644 --- a/backend/open_webui/apps/openai/main.py +++ b/backend/open_webui/apps/openai/main.py @@ -240,9 +240,7 @@ def merge_models_lists(model_lists): def is_openai_api_disabled(): - api_keys = app.state.config.OPENAI_API_KEYS - no_keys = len(api_keys) == 1 and api_keys[0] == "" - return no_keys or not app.state.config.ENABLE_OPENAI_API + return not app.state.config.ENABLE_OPENAI_API async def get_all_models_raw() -> list: