From 78bf9bad9468af45eb41e9f635276b08f8958c02 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 4 Dec 2023 23:17:51 -0800 Subject: [PATCH] chore: example.env updated --- backend/config.py | 5 ++--- example.env | 13 ++++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/backend/config.py b/backend/config.py index fa73a1f9e..14ad30e4b 100644 --- a/backend/config.py +++ b/backend/config.py @@ -6,8 +6,7 @@ from secrets import token_bytes from base64 import b64encode import os - -load_dotenv(find_dotenv()) +load_dotenv(find_dotenv("../.env")) #################################### # ENV (dev,test,prod) @@ -38,7 +37,7 @@ WEBUI_VERSION = os.environ.get("WEBUI_VERSION", "v1.0.0-alpha.21") #################################### -WEBUI_AUTH = True if os.environ.get("WEBUI_AUTH", "TRUE") == "TRUE" else False +WEBUI_AUTH = True if os.environ.get("WEBUI_AUTH", "FALSE") == "TRUE" else False #################################### diff --git a/example.env b/example.env index 00b399d9e..9c628b427 100644 --- a/example.env +++ b/example.env @@ -1,9 +1,12 @@ -# If serving with the backend (Recommended) +# If you're serving both the frontend and backend (Recommended) +# Set the public API base URL for seamless communication PUBLIC_API_BASE_URL='/ollama/api' -# Comment above and Uncomment below if you're serving only the frontend (Not supported) -# must be defined, but defaults to 'http://{location.hostname}:11434/api' -# can also use path, such as '/api' -# PUBLIC_API_BASE_URL='' +# If you're serving only the frontend (Not recommended and not fully supported) +# Comment above and Uncomment below +# You can use the default value or specify a custom path, e.g., '/api' +# PUBLIC_API_BASE_URL='http://{location.hostname}:11434/api' +# Ollama URL for the backend to connect +# The path '/ollama/api' will be redirected to the specified backend URL OLLAMA_API_BASE_URL='http://localhost:11434/api'