fix: disable 'load_dotenv' for prod environments

This commit is contained in:
Krrish Dholakia 2024-05-14 19:09:36 -07:00
parent d8ecda3310
commit c2fa620088
2 changed files with 6 additions and 2 deletions

View file

@ -15,6 +15,8 @@ from litellm.proxy._types import (
import httpx
import dotenv
litellm_mode = os.getenv("LITELLM_PRODUCTION_MODE", "DEV") # "PRODUCTION", "DEV"
if litellm_mode == "DEV":
dotenv.load_dotenv()
#############################################
if set_verbose == True:

View file

@ -11,6 +11,8 @@ sys.path.append(os.getcwd())
config_filename = "litellm.secrets"
litellm_mode = os.getenv("LITELLM_PRODUCTION_MODE", "DEV") # "PRODUCTION", "DEV"
if litellm_mode == "DEV":
load_dotenv()
from importlib import resources
import shutil