mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
fix: disable 'load_dotenv' for prod environments
This commit is contained in:
parent
298fd9b25c
commit
1ab4974773
2 changed files with 6 additions and 2 deletions
|
@ -15,6 +15,8 @@ from litellm.proxy._types import (
|
||||||
import httpx
|
import httpx
|
||||||
import dotenv
|
import dotenv
|
||||||
|
|
||||||
|
litellm_mode = os.getenv("LITELLM_PRODUCTION_MODE", "DEV") # "PRODUCTION", "DEV"
|
||||||
|
if litellm_mode == "DEV":
|
||||||
dotenv.load_dotenv()
|
dotenv.load_dotenv()
|
||||||
#############################################
|
#############################################
|
||||||
if set_verbose == True:
|
if set_verbose == True:
|
||||||
|
|
|
@ -11,6 +11,8 @@ sys.path.append(os.getcwd())
|
||||||
|
|
||||||
config_filename = "litellm.secrets"
|
config_filename = "litellm.secrets"
|
||||||
|
|
||||||
|
litellm_mode = os.getenv("LITELLM_PRODUCTION_MODE", "DEV") # "PRODUCTION", "DEV"
|
||||||
|
if litellm_mode == "DEV":
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
from importlib import resources
|
from importlib import resources
|
||||||
import shutil
|
import shutil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue