Merge pull request #822 from VaiTon/fix/env-not-existing

Better error message if .env is empty/does not exist.
This commit is contained in:
Iván Martínez 2023-08-28 17:41:47 +02:00 committed by GitHub
commit 2940f987c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -6,6 +6,8 @@ load_dotenv()
# Define the folder for storing database
PERSIST_DIRECTORY = os.environ.get('PERSIST_DIRECTORY')
if PERSIST_DIRECTORY is None:
raise Exception("Please set the PERSIST_DIRECTORY environment variable")
# Define the Chroma settings
CHROMA_SETTINGS = Settings(