zylon-ai / private-gpt

Interact with your documents using the power of GPT, 100% privately, no data leaks
https://privategpt.dev
Apache License 2.0
53.79k stars 7.22k forks source link

unsafe_settings - validation error #1774

Open spsach opened 6 months ago

spsach commented 6 months ago

I have tried to install it on Ubuntu with ollama:mistral and followed the process as per the installation manual. I am getting the following error with unsafe_settings. Any ideas?

ubuntu@ip-172-31-24-190:~/privateGPT$ make run poetry run python -m private_gpt CLASS SETTINGS UI: <class 'private_gpt.settings.settings.Settings'> 22:23:29.345 [INFO ] private_gpt.settings.settings_loader - Starting application with profiles=['default', 'ollama'] Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/ubuntu/privateGPT/private_gpt/main.py", line 5, in from private_gpt.main import app File "/home/ubuntu/privateGPT/private_gpt/main.py", line 3, in from private_gpt.di import global_injector File "/home/ubuntu/privateGPT/private_gpt/di.py", line 3, in from private_gpt.settings.settings import Settings, unsafe_typed_settings File "/home/ubuntu/privateGPT/private_gpt/settings/settings.py", line 398, in unsafe_typed_settings = Settings(**unsafe_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.cache/pypoetry/virtualenvs/private-gpt-Wtvj2B-w-py3.11/lib/python3.11/site-packages/pydantic/main.py", line 164, in init pydantic_self.pydantic_validator.validate_python(data, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 2 validation errors for Settings azopenai Field required [type=missing, input_value={'server': {'env_name': '...del': 'mistral:latest'}}, input_type=dict] For further information visit https://errors.pydantic.dev/2.5/v/missing nodestore Field required [type=missing, input_value={'server': {'env_name': '...del': 'mistral:latest'}}, input_type=dict] For further information visit https://errors.pydantic.dev/2.5/v/missing make: *** [Makefile:36: run] Error 1

spsach commented 6 months ago

I have set PGPT_PROFILES=ollama, Python 3.11, Ubuntu 22.04. make run always giving this error. unsafe_typed_settings = Settings(**unsafe_settings)

I have the same environment running properly on another machine

Has anyone else seen this error/problem?

stevenlafl commented 5 months ago

Yes. Using stock settings. No idea why.