From 2333958a6be3d4adb189b12604df7a7320023e2e Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 25 Mar 2025 13:45:51 +0100 Subject: [PATCH] upgraded to use current folder's .env if present --- lightrag/api/lightrag_server.py | 4 ++-- lightrag/api/run_with_gunicorn.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 60e39820..4477352b 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -43,12 +43,12 @@ from lightrag.kg.shared_storage import ( initialize_pipeline_status, ) from fastapi.security import OAuth2PasswordRequestForm -from .auth import auth_handler +from lightrag.api.auth import auth_handler # Load environment variables # Updated to use the .env that is inside the current folder # This update allows the user to put a different.env file for each lightrag folder -load_dotenv() +load_dotenv(".env") # Initialize config parser config = configparser.ConfigParser() diff --git a/lightrag/api/run_with_gunicorn.py b/lightrag/api/run_with_gunicorn.py index 126d772d..35724e8b 100644 --- a/lightrag/api/run_with_gunicorn.py +++ b/lightrag/api/run_with_gunicorn.py @@ -13,7 +13,7 @@ from dotenv import load_dotenv # Updated to use the .env that is inside the current folder # This update allows the user to put a different.env file for each lightrag folder -load_dotenv() +load_dotenv(".env") def check_and_install_dependencies():