mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #13342] [MERGED] feat: allow pgvector to use large embedding models #38786
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/13342
Author: @almajo
Created: 4/30/2025
Status: ✅ Merged
Merged: 4/30/2025
Merged by: @tjbck
Base:
dev← Head:feat/embedding_dim📝 Commits (1)
da9966a~ truncate vectors for pgvector if too big📊 Changes
1 file changed (+2 additions, -3 deletions)
View changed files
📝
backend/open_webui/retrieval/vector/dbs/pgvector.py(+2 -3)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
All vector databases but pgvector support embedding models with dimensions >=4096. PGVector is limited to 2000 (due to postgresql constraints).
The change simply cuts the created dimensions at the specified
VECTOR_LENGTHlength before storing - which works for major embedding models because they are Matryoshka embeddings.This tiny change allows e.g., the usage of text-embedding-3-large in combination with pgvector.
As of this discussion: https://github.com/open-webui/open-webui/discussions/10438
Changed
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.