This commit is contained in:
Timothy J. Baek 2024-01-25 00:40:19 -08:00
parent 8da06f5e74
commit 326af5a648

View File

@ -1,16 +1,9 @@
import os
import chromadb
from chromadb import Settings
from secrets import token_bytes
from base64 import b64encode
from constants import ERROR_MESSAGES
from pathlib import Path
try:
@ -21,24 +14,27 @@ except ImportError:
print("dotenv not installed, skipping...")
####################################
# File Upload
####################################
DATA_DIR = str(Path(os.getenv("DATA_DIR", "./data")).resolve())
UPLOAD_DIR = f"{DATA_DIR}/uploads"
Path(UPLOAD_DIR).mkdir(parents=True, exist_ok=True)
FRONTEND_BUILD_DIR = str(Path(os.getenv("FRONTEND_BUILD_DIR", "../build")))
####################################
# ENV (dev,test,prod)
####################################
ENV = os.environ.get("ENV", "dev")
####################################
# DATA/FRONTEND BUILD DIR
####################################
DATA_DIR = str(Path(os.getenv("DATA_DIR", "./data")).resolve())
FRONTEND_BUILD_DIR = str(Path(os.getenv("FRONTEND_BUILD_DIR", "../build")))
####################################
# File Upload DIR
####################################
UPLOAD_DIR = f"{DATA_DIR}/uploads"
Path(UPLOAD_DIR).mkdir(parents=True, exist_ok=True)
####################################
# OLLAMA_API_BASE_URL
####################################