private-gpt: Pydantic validation error with ['default', 'docker']
I tried to run docker compose run --rm --entrypoint="bash -c '[ -f scripts/setup ] && scripts/setup'" private-gpt
In a compose file somewhat similar to the repo:
version: '3'
services:
private-gpt:
image: marcorepettocertx/privategpt:0.4.0
volumes:
- ./private-gpt/local_data/:/home/worker/app/local_data
- ./private-gpt/models/:/home/worker/app/models
ports:
- 8001:8080
environment:
PORT: 8080
PGPT_PROFILES: docker
PGPT_MODE: local
But I got in return the following error:
10:25:57.921 [INFO ] private_gpt.settings.settings_loader - Starting application with profiles=['default', 'docker']
Traceback (most recent call last):
File "/home/worker/app/scripts/setup", line 8, in <module>
from private_gpt.paths import models_path, models_cache_path
File "/home/worker/app/private_gpt/paths.py", line 4, in <module>
from private_gpt.settings.settings import settings
File "/home/worker/app/private_gpt/settings/settings.py", line 392, in <module>
unsafe_typed_settings = Settings(**unsafe_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/worker/app/.venv/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
llm.mode
Input should be 'llamacpp', 'openai', 'openailike', 'azopenai', 'sagemaker', 'mock' or 'ollama' [type=literal_error, input_value='local', input_type=str]
For further information visit https://errors.pydantic.dev/2.5/v/literal_error
embedding.mode
Input should be 'huggingface', 'openai', 'azopenai', 'sagemaker', 'ollama' or 'mock' [type=literal_error, input_value='local', input_type=str]
For further information visit https://errors.pydantic.dev/2.5/v/literal_error
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15 (9 by maintainers)
Indeed
quite works. But still requires an embedding mode, which is different from
llamacpp.