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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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:
dev← Head:feat/pgvector📝 Commits (2)
701f40afeat: Initial support for pgvector319ea8cfeat: 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.