Files
DB-GPT/pilot/configs/__init__.py
yihong0618 9dc542ca45 fix: dotenv can not load
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
2023-05-24 15:18:06 +08:00

15 lines
311 B
Python

import os
import random
import sys
from dotenv import load_dotenv
if "pytest" in sys.argv or "pytest" in sys.modules or os.getenv("CI"):
print("Setting random seed to 42")
random.seed(42)
# Load the users .env file into environment variables
load_dotenv(verbose=True, override=True)
del load_dotenv