Add support for supplying custom db params (#1276)

This commit is contained in:
Deshraj Yadav
2024-02-21 16:15:57 -08:00
committed by GitHub
parent f8f69eab03
commit aa5ad625af
12 changed files with 36 additions and 32 deletions

View File

@@ -6,4 +6,6 @@ HOME_DIR = str(Path.home())
CONFIG_DIR = os.path.join(HOME_DIR, ".embedchain")
CONFIG_FILE = os.path.join(CONFIG_DIR, "config.json")
SQLITE_PATH = os.path.join(CONFIG_DIR, "embedchain.db")
DB_URI = f"sqlite:///{SQLITE_PATH}"
# Set the environment variable for the database URI
os.environ.setdefault("EMBEDCHAIN_DB_URI", f"sqlite:///{SQLITE_PATH}")