Support for external VectorDB #938
Replies: 24 comments 41 replies
-
I totaly agréé with your proposal. It Could be very usefull if user Could set up an ui property to configuré links to multiple chromadb ensuring sécurity accès and multiple rag options. Is there àny hint on how to move to thèse tumype of solution ? |
Beta Was this translation helpful? Give feedback.
-
+1 for pgvector |
Beta Was this translation helpful? Give feedback.
-
There must be a way to connect Open Web UI to an external Vector database! What would be very cool is if you could select an external Vector database under Settings in Open Web UI. How can such a functionality be built into the settings? Simply add a button, such as "select a Vector database" or "add Vector database". Then you can enter the location of the vector database and other parameters and you're done. |
Beta Was this translation helpful? Give feedback.
-
How can I connect the Vespa vector database with Open Webui? |
Beta Was this translation helpful? Give feedback.
-
Did you set up your own chroma instance?
If yes, did you expose the port?
More over the chroma client and server should have the same version
See here
chroma-core/chroma#2510
Le dim. 18 août 2024, 16:00, Hasan Iqbal ***@***.***> a
écrit :
… Its already a feature, just use the environmental variables
https://docs.openwebui.com/getting-started/env-configuration/#rag
in docker compose there go under
environment:
- 'CHROMA_HTTP_HOST=ip/hostname'
- 'CHROMA_HTTP_PORT=8000'
or put them in your .env file
I have not fully tested this and plan to so please read all documentation
linked.
This doesn't work for me, I tried :
docker run -d -p 3001:8080 -v open-webui2:/app/backend/data -v
D:/open-webui/rag-data:/app/backend/data/docs -e CHROMA_HTTP_HOST="
http://host.docker.internal" -e CHROMA_HTTP_PORT=8000 --name open-webui2
--restart always ghcr.io/open-webui/open-webui:main
And I get this error:
2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/chromadb/api/base_http_client.py",
line 97, in _raise_chroma_error 2024-08-18 18:57:26 raise
(Exception(resp.text)) 2024-08-18 18:57:26 Exception: <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN"> 2024-08-18 18:57:26 <html><head> 2024-08-18
18:57:26 <title>503 Service Unavailable</title> 2024-08-18 18:57:26
</head><body> 2024-08-18 18:57:26 <h1>Service Unavailable</h1> 2024-08-18
18:57:26 <p>The server is temporarily unable to service your 2024-08-18
18:57:26 request due to maintenance downtime or capacity 2024-08-18
18:57:26 problems. Please try again later.</p> 2024-08-18 18:57:26
</body></html> 2024-08-18 18:57:26 2024-08-18 18:57:26 2024-08-18 18:57:26
During handling of the above exception, another exception occurred:
2024-08-18 18:57:26 2024-08-18 18:57:26 Traceback (most recent call last):
2024-08-18 18:57:26 File "/usr/local/bin/uvicorn", line 8, in <module>
2024-08-18 18:57:26 sys.exit(main()) 2024-08-18 18:57:26 ^^^^^^ 2024-08-18
18:57:26 File "/usr/local/lib/python3.11/site-packages/click/core.py", line
1157, in __call__ 2024-08-18 18:57:26 return self.main(*args, **kwargs)
2024-08-18 18:57:26 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
2024-08-18 18:57:26 rv = self.invoke(ctx) 2024-08-18 18:57:26
^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in
invoke 2024-08-18 18:57:26 return ctx.invoke(self.callback, **ctx.params)
2024-08-18 18:57:26 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18
18:57:26 File "/usr/local/lib/python3.11/site-packages/click/core.py", line
783, in invoke 2024-08-18 18:57:26 return __callback(*args, **kwargs)
2024-08-18 18:57:26 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 410, in
main 2024-08-18 18:57:26 run( 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 578, in run
2024-08-18 18:57:26 server.run() 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 61, in
run 2024-08-18 18:57:26 return asyncio.run(self.serve(sockets=sockets))
2024-08-18 18:57:26 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18
18:57:26 File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in
run 2024-08-18 18:57:26 return runner.run(main) 2024-08-18 18:57:26
^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run 2024-08-18
18:57:26 return self._loop.run_until_complete(task) 2024-08-18 18:57:26
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 68, in
serve 2024-08-18 18:57:26 config.load() 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 473, in
load 2024-08-18 18:57:26 self.loaded_app = import_from_string(self.app)
2024-08-18 18:57:26 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in
import_from_string 2024-08-18 18:57:26 module =
importlib.import_module(module_str) 2024-08-18 18:57:26
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/importlib/__init__.py", line 126, in
import_module 2024-08-18 18:57:26 return
_bootstrap._gcd_import(name[level:], package, level) 2024-08-18 18:57:26
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import 2024-08-18
18:57:26 File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-08-18 18:57:26 File "<frozen importlib._bootstrap>", line 1147, in
_find_and_load_unlocked 2024-08-18 18:57:26 File "<frozen
importlib._bootstrap>", line 690, in _load_unlocked 2024-08-18 18:57:26
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2024-08-18 18:57:26 File "<frozen importlib._bootstrap>", line 241, in
_call_with_frames_removed 2024-08-18 18:57:26 File "/app/backend/main.py",
line 30, in <module> 2024-08-18 18:57:26 from apps.socket.main import app
as socket_app, get_event_emitter, get_event_call 2024-08-18 18:57:26 File
"/app/backend/apps/socket/main.py", line 5, in <module> 2024-08-18 18:57:26
from apps.webui.models.users import Users 2024-08-18 18:57:26 File
"/app/backend/apps/webui/models/users.py", line 9, in <module> 2024-08-18
18:57:26 from apps.webui.internal.db import Base, JSONField, Session,
get_db 2024-08-18 18:57:26 File "/app/backend/apps/webui/internal/db.py",
line 7, in <module> 2024-08-18 18:57:26 from apps.webui.internal.wrappers
import register_connection 2024-08-18 18:57:26 File
"/app/backend/apps/webui/internal/wrappers.py", line 9, in <module>
2024-08-18 18:57:26 from config import SRC_LOG_LEVELS 2024-08-18 18:57:26
File "/app/backend/config.py", line 1074, in <module> 2024-08-18 18:57:26
CHROMA_CLIENT = chromadb.HttpClient( 2024-08-18 18:57:26
^^^^^^^^^^^^^^^^^^^^ 2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/chromadb/__init__.py", line 204,
in HttpClient 2024-08-18 18:57:26 return ClientCreator(tenant=tenant,
database=database, settings=settings) 2024-08-18 18:57:26
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-18 18:57:26 File
"/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 61,
in __init__ 2024-08-18 18:57:26
self._validate_tenant_database(tenant=tenant, database=database) 2024-08-18
18:57:26 File
"/usr/local/lib/python3.11/site-packages/chromadb/api/client.py", line 380,
in _validate_tenant_database 2024-08-18 18:57:27 Loading WEBUI_SECRET_KEY
from file, not provided as an environment variable. 2024-08-18 18:57:27
Loading WEBUI_SECRET_KEY from .webui_secret_key 2024-08-18 18:57:26 raise
ValueError( 2024-08-18 18:57:26 ValueError: Could not connect to tenant
default_tenant. Are you sure it exists?
—
Reply to this email directly, view it on GitHub
<#938 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZRFC2GFL6K3ZVHJDJIE3ZSCSHDAVCNFSM6AAAAABD374GGGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZXGMYDMNQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have experimented a lot with RAG and ChromaDB under Open WEBUI. The results were not good! The whole thing is not ready for production yet. I read somewhere that RAG2 is coming. I hope RAG2 is better! |
Beta Was this translation helpful? Give feedback.
-
Could you please tell us which vector database to use?
What are the better parameters for chunck etc... For basic scientific pdf
publication?
Thanks
Le lun. 19 août 2024, 12:49, Manfredzimmermann ***@***.***> a
écrit :
… I have experimented a lot with RAG and ChromaDB under Open WEBUI. The
results were not good! The whole thing is not ready for production yet. I
read somewhere that RAG2 is coming. I hope RAG2 is better!
—
Reply to this email directly, view it on GitHub
<#938 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZRFGMEN4TPMMV7NWJW2DZSHEULAVCNFSM6AAAAABD374GGGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZYGIYTKMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing your experience.
Do you have any advice?
To switch to another vector database?
Any reference on rag2?
Thanks again
Le lun. 19 août 2024, 21:11, Manfredzimmermann ***@***.***> a
écrit :
… I have used different chunk methods under ChromaDB. There is a fixed size
and recursive method and so on. But the results were not good! The whole
thing is not suitable for a productive environment, in my opinion.
—
Reply to this email directly, view it on GitHub
<#938 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZRFGWJDGF4RMK3V6BVRTZSI7NJAVCNFSM6AAAAABD374GGGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZYG43TMMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I can't give any advice at the moment without a clear conscience! Unfortunately, I haven't found any information on the Internet yet about how to use RAG2 with Python and the like. Open-webui is cool and remarkable, but not yet suitable for a productive environment. But I'm sure that it will be in the future if programming continues. It's missing some features or functions. Such as connection to an LDAP server, assignment of more than one LLM model to a specific group. So, different user groups with different LLMs. RAG2 or something similar that is able to write various documents (PDF, CSV, Word, Excel and etc.) very well into a vector database and delivers results for queries with 99% accuracy. When it comes to medical data, then 100% accuracy. What would also be very cool is chatting with structured data, i.e. a connection to an SQL database, so that a user can chat with the SQL database using natural language and also create diagrams if necessary. But the LLM must be able to interpret the queries very well! |
Beta Was this translation helpful? Give feedback.
-
You can use a N8N webhook function to chat with an AI agent connected to an external vector database. Just not sure the best way to seamlessly upload documents to this database, via Open WebUI --> N8N --> write to vector database. Any Ideas? |
Beta Was this translation helpful? Give feedback.
-
It seems you can easily add your own qdrant vector store! just set
in the docker-compose.yml you will also need to have qdrant defined as a service in the docker-compose.yml something like this (with network and volumes defined)
|
Beta Was this translation helpful? Give feedback.
-
Just want to know whether RAG with OpenWebUI is working with ChromaDB as an external database. I am facing an error as below which I believe parameters in below json "where":{},"where_document":{} should have values or NULL instead of being empty. Any settings to be changed in "Knowledge Base" of OpenWebUI? POST /api/v1/collections/$CollectionID/query HTTP/1.1 400 Bad Request |
Beta Was this translation helpful? Give feedback.
-
Openwebui is fully interoperable with chromadb. I am using it. Be careful
your chromadb instance should have the same versio ideally with the
chromadb client version in openwebui.
Le jeu. 16 janv. 2025, 18:53, sudhirvadlamani ***@***.***> a
écrit :
… Just want to know whether RAG with OpenWebUI is working with ChromaDB as
an external database. I am facing an error as below which I believe
parameters in below json "where":{},"where_document":{} should have values
or NULL instead of being empty. Any settings to be changed in "Knowledge
Base" of OpenWebUI?
POST /api/v1/collections/$CollectionID/query
{"query_embeddings":[[xxxxxxxxxxxxxxxxxxxx],"n_results":3,"where":{},"where_document":{},"include":["metadatas","documents","distances"]}
HTTP/1.1 400 Bad Request
{"error":"InvalidArgumentError","message":"Expected where to have exactly
one operator, got {}"}
—
Reply to this email directly, view it on GitHub
<#938 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKZRFFZOGT523WQBSETBMT2K7WZBAVCNFSM6AAAAABD374GGGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBVG44DAMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Load a document and then go to qdrant uri and see if it has been added.
Tasman
…________________________________
From: Yash ***@***.***>
Sent: Thursday, February 13, 2025 4:21:16 PM
To: open-webui/open-webui ***@***.***>
Cc: tazomatalax ***@***.***>; Comment ***@***.***>
Subject: Re: [open-webui/open-webui] Support for external VectorDB (Discussion #938)
docker run -d -p 48080:8080 --add-host=host.docker.internal:$IPAddress -e OLLAMA_BASE_URL=http://$IPAddress:11434 -e VECTOR_DB=qdrant -e QDRANT_URI=http://$IPAddress:6333/ -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
I performed this docker command and open webUI is running but how can I verify that it is connected with qdrant db?
—
Reply to this email directly, view it on GitHub<#938 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQKHRAWPLEIYAVFDMAHGXL32PQFSZAVCNFSM6AAAAABD374GGGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJYGIZDOMA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
So far, does the latest version of OpenWebUI support pgvector vector databases? |
Beta Was this translation helpful? Give feedback.
-
Just a thought (I've noticed that the RAG performance is not quite there but not a million miles off either and FWIW, I would personally love to use Weaviate, whether self-hosted or remote): Chroma DB may be perfectly sufficient for the vast majority of users. But what wwould definitely be useful is some more granular embedding options: For example, if the same user wishes to embed a big chunk of documents and CSV data ... the same embedding profile isn't going to work well for both of them. As far as I can tell, right now, we can only configure one set of RAG variables and they are being applied across the board. |
Beta Was this translation helpful? Give feedback.
-
switch to postgress databes and pgvector as verctor database. everything works great for 200 users.. |
Beta Was this translation helpful? Give feedback.
-
Hi, no problem, glad to help. create a docker-compose.yml for your services. add the following to the file: services: openWebUI:
redis1: redis-insight: save the file and then run: best hide open webui port 3000 behind haproxy or nginx for SSL/HTTPS with your internal URL. |
Beta Was this translation helpful? Give feedback.
-
To me, it seems like when I set this up, I got an error where /redis/redis.conf is not found. (Note: not fully sure because I not follow exactly as I change a few settings based on my own preference)
|
Beta Was this translation helpful? Give feedback.
-
+20 for Milvus and ElasticSearch |
Beta Was this translation helpful? Give feedback.
-
One challenge I face now is getting to make this work with TimescaleDB. Anyone tried this before? How did you go about it. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have been using OpenwebUI with chromaDB from past 8 months supporting 500 users with 7 different RAG agents. I am planning to shift from ChromaDB to Qdrant. Shall I go ahead and do it? If yes, do I need to re-upload all the documents to knowledge bases. |
Beta Was this translation helpful? Give feedback.
-
fully support the improvement to connect to external vector databases like Qdrant and PgVector via environment variable configuration. This will greatly benefit scalability and production readiness. |
Beta Was this translation helpful? Give feedback.
-
Hello, I am currently trying to connect external chroma db to open web ui. I was reading threads and saw people have done it before but I am still confused how to do it. Right now what I have done is created a network on docker and put both my chroma db server and open web ui in there and connected them but now how do I index data into chroma db that it shows up in the knolwedge base of open web ui or somehow connect it so I can create a rag chatbot? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In advance: I'm in no means expert for open-webui, so take my quotes with a grain of salt.
Currently open-webui's internal RAG system uses an internal ChromaDB (according to Dockerfile and backend/requirements.txt).
Supporting an external vector database would bring several benefits:
Beta Was this translation helpful? Give feedback.
All reactions