Fix OPENAI_API_BASE not working in .env
This commit is contained in:
parent
9d990a41e6
commit
14b4bc96ce
1 changed files with 7 additions and 0 deletions
|
|
@ -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"""
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue