mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 13:55:41 +01:00
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:
commit
2940f987c0
3 changed files with 10 additions and 5 deletions
|
|
@ -10,7 +10,9 @@ import os
|
|||
import argparse
|
||||
import time
|
||||
|
||||
load_dotenv()
|
||||
if not load_dotenv():
|
||||
print("Could not load .env file or it is empty. Please check if it exists and is readable.")
|
||||
exit(1)
|
||||
|
||||
embeddings_model_name = os.environ.get("EMBEDDINGS_MODEL_NAME")
|
||||
persist_directory = os.environ.get('PERSIST_DIRECTORY')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue