From e3fc97241d2c14038396117af83bd9ba2e3a123b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 10 Mar 2024 19:26:06 -0700 Subject: [PATCH] fix: env var migration issue --- backend/config.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/config.py b/backend/config.py index f680e08a..831371bb 100644 --- a/backend/config.py +++ b/backend/config.py @@ -209,10 +209,6 @@ OLLAMA_API_BASE_URL = os.environ.get( OLLAMA_BASE_URL = os.environ.get("OLLAMA_BASE_URL", "") -if ENV == "prod": - if OLLAMA_BASE_URL == "/ollama": - OLLAMA_BASE_URL = "http://host.docker.internal:11434" - if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "": OLLAMA_BASE_URL = ( @@ -221,6 +217,11 @@ if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "": else OLLAMA_API_BASE_URL ) +if ENV == "prod": + if OLLAMA_BASE_URL == "/ollama": + OLLAMA_BASE_URL = "http://host.docker.internal:11434" + + OLLAMA_BASE_URLS = os.environ.get("OLLAMA_BASE_URLS", "") OLLAMA_BASE_URLS = OLLAMA_BASE_URLS if OLLAMA_BASE_URLS != "" else OLLAMA_BASE_URL