Fix OPENAI_API_BASE not working in .env

This commit is contained in:
yangdx
2025-04-17 05:20:22 +08:00
parent 9d990a41e6
commit 14b4bc96ce

View File

@@ -37,6 +37,13 @@ from lightrag.api import __api_version__
import numpy as np import numpy as np
from typing import Any, Union from typing import Any, Union
from dotenv import load_dotenv
# use the .env that is inside the current folder
# allows to use different .env file for each lightrag instance
# the OS environment variables take precedence over the .env file
load_dotenv(dotenv_path=".env", override=False)
class InvalidResponseError(Exception): class InvalidResponseError(Exception):
"""Custom exception class for triggering retry mechanism""" """Custom exception class for triggering retry mechanism"""