private-gpt icon indicating copy to clipboard operation
private-gpt copied to clipboard

Chroma settings causing error when using privategpt.py

Open Eldiablozzz opened this issue 1 year ago • 11 comments

This is the error i get when i use python privategpt.py. (my ingest.py worked fine for me it took some time but did finish without any errors, but privategpt.py does not work) Traceback (most recent call last): File "E:\pvt\privateGPT\privategpt.py", line 18, in from constants import CHROMA_SETTINGS File "E:\pvt\privateGPT\constants.py", line 11, in 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)

Eldiablozzz avatar May 15 '23 19:05 Eldiablozzz

I experienced the same issue.

shuxiangzhang avatar May 15 '23 21:05 shuxiangzhang

Does the .env file exist?

nickali avatar May 15 '23 21:05 nickali

@nickali Thanks for the reply. It turns out I did not download the required models and place them in the models folder cause I initially thought they came with the GitHub zip file. Creating the models folder and placing the downloaded LLMs for embedding and generation in the folder solves the problem for me.

shuxiangzhang avatar May 15 '23 21:05 shuxiangzhang

Yes, .env file is double checked. Both models are in models folder and their names also checked.

On Tue, 16 May 2023, 03:06 Nick Ali, @.***> wrote:

Does the .env file exist?

— Reply to this email directly, view it on GitHub https://github.com/imartinez/privateGPT/issues/172#issuecomment-1548623948, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7B5Z7KXOZBHNQHF7HVCF63XGKOVVANCNFSM6AAAAAAYCUX53M . You are receiving this because you authored the thread.Message ID: @.***>

Eldiablozzz avatar May 16 '23 01:05 Eldiablozzz

Ok solved it, the model was not loading may be because it was corrupted during download. Used different ggml which i already had and it worked. Though now i am facing a new issue, after 1st query (no matter how big or small) the error appears on 2nd query : ggml_new_tensor_impl: not enough space in the context's memory pool (needed 8707242512, available 8649106400) I have 64gb ram and in resources i can see that hardly 20gb is used.

Eldiablozzz avatar May 16 '23 10:05 Eldiablozzz

Same error here after 2nd query.

sjssmits avatar May 17 '23 17:05 sjssmits

Also having the same issue. I have the .env file and the model set in the models folder but the problem persists.

E:\Programs\PrivateGPT\privateGPT>python privateGPT.py Traceback (most recent call last): File "E:\Programs\PrivateGPT\privateGPT\privateGPT.py", line 20, in from constants import CHROMA_SETTINGS File "E:\Programs\PrivateGPT\privateGPT\constants.py", line 11, in 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)

Nemcade avatar May 22 '23 08:05 Nemcade

@Nemcade that errors means your .env file is not setup correctly.

PulpCattel avatar May 22 '23 08:05 PulpCattel

@Nemcade that errors means your .env file is not setup correctly.

Wonder what's wrong with it. I renamed it to .env and it looks like this.

PERSIST_DIRECTORY=db MODEL_TYPE=GPT4All MODEL_PATH=models/ggml-gpt4all-j-v1.3-groovy.bin EMBEDDINGS_MODEL_NAME=all-MiniLM-L6-v2 MODEL_N_CTX=1000

Nemcade avatar May 22 '23 09:05 Nemcade

The content seems correct. Make sure the file name is correct and that it's in the right folder.

PulpCattel avatar May 22 '23 09:05 PulpCattel

it seems because i just use regular text notepad to change the filename it renamed it as env.env weirdly. Now that I used visual studio to save a new one everything seems to work! Thanks for narrowing it down that the problem was in the file!

Nemcade avatar May 22 '23 09:05 Nemcade