Merge pull request #1185 from ParisNeo/main
Browse filesupgraded to use current folder's .env if present
lightrag/api/lightrag_server.py
CHANGED
@@ -43,12 +43,12 @@ from lightrag.kg.shared_storage import (
|
|
43 |
initialize_pipeline_status,
|
44 |
)
|
45 |
from fastapi.security import OAuth2PasswordRequestForm
|
46 |
-
from .auth import auth_handler
|
47 |
|
48 |
# Load environment variables
|
49 |
# Updated to use the .env that is inside the current folder
|
50 |
# This update allows the user to put a different.env file for each lightrag folder
|
51 |
-
load_dotenv()
|
52 |
|
53 |
# Initialize config parser
|
54 |
config = configparser.ConfigParser()
|
|
|
43 |
initialize_pipeline_status,
|
44 |
)
|
45 |
from fastapi.security import OAuth2PasswordRequestForm
|
46 |
+
from lightrag.api.auth import auth_handler
|
47 |
|
48 |
# Load environment variables
|
49 |
# Updated to use the .env that is inside the current folder
|
50 |
# This update allows the user to put a different.env file for each lightrag folder
|
51 |
+
load_dotenv(".env")
|
52 |
|
53 |
# Initialize config parser
|
54 |
config = configparser.ConfigParser()
|
lightrag/api/run_with_gunicorn.py
CHANGED
@@ -13,7 +13,7 @@ from dotenv import load_dotenv
|
|
13 |
|
14 |
# Updated to use the .env that is inside the current folder
|
15 |
# This update allows the user to put a different.env file for each lightrag folder
|
16 |
-
load_dotenv()
|
17 |
|
18 |
|
19 |
def check_and_install_dependencies():
|
|
|
13 |
|
14 |
# Updated to use the .env that is inside the current folder
|
15 |
# This update allows the user to put a different.env file for each lightrag folder
|
16 |
+
load_dotenv(".env")
|
17 |
|
18 |
|
19 |
def check_and_install_dependencies():
|