-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
private-gpt: init at 0.5.0 #305586
private-gpt: init at 0.5.0 #305586
Conversation
00cf90d
to
3c9c2f5
Compare
3c9c2f5
to
ab753bc
Compare
a596c98
to
ccbcfc2
Compare
eb7409d
to
3894039
Compare
89de83a
to
ae978e5
Compare
3ea2d9d
to
d4b0e24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Consider chmod 660 for the config file for reasons mentioned
- Fix typo
- Consider requesting upstream to release new version so that we don't have to patch security vulnerabiliy prior to merge
Reviewed the code, didn't find any problems beyond mentioned, LGTM
Package itself was not tested as i am not familiar with the service.
cf9a8a1
to
3b1bded
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Did not test the software for reasons mentioned
- CI doesn't return any blocking issues
- Submitter sufficiently addressed highlighted problems
- I don't see any issues
LGTM
Hi! Couldn't make it work, with systemctl status private-gpt.serviceprivate-gpt[3636]: 14:36:29.565 [INFO ] private_gpt.settings.settings_loader - Starting application with profiles=['default', 'local']
private-gpt[3636]: Error in cpuinfo: failed to parse processor information from /proc/cpuinfo
private-gpt[3636]: 14:36:33.268 [INFO ] private_gpt.components.llm.llm_component - Initializing the LLM in mode=ollama
private-gpt[3636]: 14:36:34.133 [INFO ] private_gpt.components.embedding.embedding_component - Initializing the embedding model in mode=ollama
private-gpt[3636]: Traceback (most recent call last):
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 798, in get
private-gpt[3636]: return self._context[key]
private-gpt[3636]: ~~~~~~~~~~~~~^^^^^
private-gpt[3636]: KeyError: <class 'private_gpt.ui.ui.PrivateGptUi'>
private-gpt[3636]: During handling of the above exception, another exception occurred:
private-gpt[3636]: Traceback (most recent call last):
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 798, in get
private-gpt[3636]: return self._context[key]
private-gpt[3636]: ~~~~~~~~~~~~~^^^^^
private-gpt[3636]: KeyError: <class 'private_gpt.server.ingest.ingest_service.IngestService'>
private-gpt[3636]: During handling of the above exception, another exception occurred:
private-gpt[3636]: Traceback (most recent call last):
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 798, in get
private-gpt[3636]: return self._context[key]
private-gpt[3636]: ~~~~~~~~~~~~~^^^^^
private-gpt[3636]: KeyError: <class 'private_gpt.components.embedding.embedding_component.EmbeddingComponent'>
private-gpt[3636]: During handling of the above exception, another exception occurred:
private-gpt[3636]: Traceback (most recent call last):
private-gpt[3636]: File "/nix/store/vhqp00qxbbaq22aja41m8bgrlzjwfcak-python3.11-private-gpt-0.5.0/lib/python3.11/site-packages/private_gpt/components/embedding/embedding_component.py", line 62, in __init__
private-gpt[3636]: from llama_index.embeddings.ollama import ( # type: ignore
private-gpt[3636]: ModuleNotFoundError: No module named 'llama_index.embeddings.ollama'
private-gpt[3636]: The above exception was the direct cause of the following exception:
private-gpt[3636]: Traceback (most recent call last):
private-gpt[3636]: File "<frozen runpy>", line 198, in _run_module_as_main
private-gpt[3636]: File "<frozen runpy>", line 88, in _run_code
private-gpt[3636]: File "/nix/store/vhqp00qxbbaq22aja41m8bgrlzjwfcak-python3.11-private-gpt-0.5.0/lib/python3.11/site-packages/private_gpt/__main__.py", line 5, in <module>
private-gpt[3636]: from private_gpt.main import app
private-gpt[3636]: File "/nix/store/vhqp00qxbbaq22aja41m8bgrlzjwfcak-python3.11-private-gpt-0.5.0/lib/python3.11/site-packages/private_gpt/main.py", line 6, in <module>
private-gpt[3636]: app = create_app(global_injector)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/vhqp00qxbbaq22aja41m8bgrlzjwfcak-python3.11-private-gpt-0.5.0/lib/python3.11/site-packages/private_gpt/launcher.py", line 63, in create_app
private-gpt[3636]: ui = root_injector.get(PrivateGptUi)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 974, in get
private-gpt[3636]: provider_instance = scope_instance.get(interface, binding.provider)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 800, in get
private-gpt[3636]: instance = self._get_instance(key, provider, self.injector)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance
private-gpt[3636]: return provider.get(injector)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 264, in get
private-gpt[3636]: return injector.create_object(self._cls)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object
private-gpt[3636]: self.call_with_injection(init, self_=instance, kwargs=additional_kwargs)
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 1031, in call_with_injection
private-gpt[3636]: dependencies = self.args_to_inject(
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 1079, in args_to_inject
private-gpt[3636]: instance: Any = self.get(interface)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 974, in get
private-gpt[3636]: provider_instance = scope_instance.get(interface, binding.provider)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 800, in get
private-gpt[3636]: instance = self._get_instance(key, provider, self.injector)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance
private-gpt[3636]: return provider.get(injector)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 264, in get
private-gpt[3636]: return injector.create_object(self._cls)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object
private-gpt[3636]: self.call_with_injection(init, self_=instance, kwargs=additional_kwargs)
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 1031, in call_with_injection
private-gpt[3636]: dependencies = self.args_to_inject(
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 1079, in args_to_inject
private-gpt[3636]: instance: Any = self.get(interface)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 974, in get
private-gpt[3636]: provider_instance = scope_instance.get(interface, binding.provider)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt[3636]: return function(*args, **kwargs)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 800, in get
private-gpt[3636]: instance = self._get_instance(key, provider, self.injector)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance
private-gpt[3636]: return provider.get(injector)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 264, in get
private-gpt[3636]: return injector.create_object(self._cls)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object
private-gpt[3636]: self.call_with_injection(init, self_=instance, kwargs=additional_kwargs)
private-gpt[3636]: File "/nix/store/j1yamvi5g0x4wnm3p6jslg73nnpjll0v-python3.11-injector-0.21.0/lib/python3.11/site-packages/injector/__init__.py", line 1040, in call_with_injection
private-gpt[3636]: return callable(*full_args, **dependencies)
private-gpt[3636]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt[3636]: File "/nix/store/vhqp00qxbbaq22aja41m8bgrlzjwfcak-python3.11-private-gpt-0.5.0/lib/python3.11/site-packages/private_gpt/components/embedding/embedding_component.py", line 66, in __init__
private-gpt[3636]: raise ImportError(
private-gpt[3636]: ImportError: Local dependencies not found, install with `poetry install --extras embeddings-ollama`
systemd[1]: private-gpt.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: private-gpt.service: Failed with result 'exit-code'.
systemd[1]: private-gpt.service: Consumed 5.480s CPU time, no IP traffic.
|
I will try to have a look at it next week. In the meantime, I switched to open-webui: #316248 |
I have the same issue now:
I've been testing plenty of things. I added Something must have changed, maybe @fabaff or @mweinelt can help here? Do you know if something has changed somewhere? |
Nothing off the top of my head. Probably best to bisect. |
Will do that. |
Here it is: a03085b
|
Is the reference actually retained in the |
I'm not familiar with Python, so I can't really tell. At this point, I think the issue mostly comes from an issue in one of these python packages... but I can't tell which or why. |
There's no problem with "imports", |
Should fix: #232681
Status: working.
Working example with a local Ollama service (
nix run nixpkgs#ollama -- serve
):settings.yaml
from https://github.com/zylon-ai/private-gpt/blob/main/settings.yamlsettings-local.yaml
from https://github.com/zylon-ai/private-gpt/blob/main/settings-local.yamlsettings-local.yaml
as such:private-gpt
as such:An issue has been opened upstream to fix the tests: zylon-ai/private-gpt#1870
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.