[PR #6645] [MERGED] feat: Intial support for pgvector as backing vector database #8725

Closed
opened 2025-11-11 18:04:13 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/6645
Author: @jk-f5
Created: 11/1/2024
Status: Merged
Merged: 11/5/2024
Merged by: @tjbck

Base: devHead: feat/pgvector


📝 Commits (2)

  • 701f40a feat: Initial support for pgvector
  • 319ea8c feat: Add ability to set URI for pgvector

📊 Changes

5 files changed (+365 additions, -1 deletions)

View changed files

📝 .dockerignore (+2 -1)
📝 backend/open_webui/apps/retrieval/vector/connector.py (+4 -0)
backend/open_webui/apps/retrieval/vector/dbs/pgvector.py (+352 -0)
📝 backend/open_webui/config.py (+6 -0)
📝 backend/requirements.txt (+1 -0)

📄 Description

Changelog

Description

The PR introduces support for using pgvector as a backing vector datastore.

Notes

  • One can bring their own PGVECTOR_DB_URL or choose to use the primary app database connection (assuming it is postgres with pgvector support).
  • Currently the vector size is set to 1536. Any embedding models producing smaller vector sizes are padded with zeros. (Setting a size on a vector column is required in order to index it)
    • Another option is to create additional vector columns of common vector sizes.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/6645 **Author:** [@jk-f5](https://github.com/jk-f5) **Created:** 11/1/2024 **Status:** ✅ Merged **Merged:** 11/5/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `feat/pgvector` --- ### 📝 Commits (2) - [`701f40a`](https://github.com/open-webui/open-webui/commit/701f40aedd580e012ffca837bb4de4fec58410de) feat: Initial support for pgvector - [`319ea8c`](https://github.com/open-webui/open-webui/commit/319ea8cb7f458e3263311603c44c9061249884f8) feat: Add ability to set URI for pgvector ### 📊 Changes **5 files changed** (+365 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+2 -1) 📝 `backend/open_webui/apps/retrieval/vector/connector.py` (+4 -0) ➕ `backend/open_webui/apps/retrieval/vector/dbs/pgvector.py` (+352 -0) 📝 `backend/open_webui/config.py` (+6 -0) 📝 `backend/requirements.txt` (+1 -0) </details> ### 📄 Description # Changelog ## Description The PR introduces support for using pgvector as a backing vector datastore. ### Notes - One can bring their own PGVECTOR_DB_URL or choose to use the primary app database connection (assuming it is postgres with pgvector support). - Currently the vector size is set to 1536. Any embedding models producing smaller vector sizes are padded with zeros. (Setting a size on a vector column is required in order to index it) - Another option is to create additional vector columns of common vector sizes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 18:04:13 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#8725