private-gpt
private-gpt copied to clipboard
python ingest.py fails
When I run python ingest.py
it outputs:
Traceback (most recent call last):
File "C:\Users\Josh\Documents\privateGPT-main\privateGPT-main\ingest.py", line 27, in <module>
from constants import CHROMA_SETTINGS
File "C:\Users\Josh\Documents\privateGPT-main\privateGPT-main\constants.py", line 11, in <module>
CHROMA_SETTINGS = Settings(
File "pydantic\env_settings.py", line 39, in pydantic.env_settings.BaseSettings.__init__
File "pydantic\main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Settings
persist_directory
none is not an allowed value (type=type_error.none.not_allowed)
- OS / hardware: Windows 10 Acer Switch Alpha 12 intel i5
- Python version 3.10.11
- example.env file contents:
PERSIST_DIRECTORY=db
MODEL_TYPE=GPT4All
MODEL_PATH=Downloads\ggml-gpt4all-j-v1.3-groovy.bin
EMBEDDINGS_MODEL_NAME=all-MiniLM-L6-v2
MODEL_N_CTX=1000
TARGET_SOURCE_CHUNKS=4
You need to remove example
from example.env
so you're left with only .env
Hi, exactly, after copying "example.env" to ".env", it's working fine. Thanks
After renaming example.env to .env it works
I had this issue too, but I had renamed example.env to .env.
I had to install Visual Studio build tools
and pip install chromadb
and then pip install sentence_transformers
and then a few others.
I couldn't build the wheels (I think?) because I needed to install the build tools when I ran the requirements.txt. After installing the build tools, I ran pip install -r requirements.txt again, and it had work to do.