mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #11526] [MERGED] Exlude images from embeddings #22754
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/11526
Author: @rragundez
Created: 3/11/2025
Status: ✅ Merged
Merged: 3/11/2025
Merged by: @tjbck
Base:
dev← Head:exlude-images-from-embeddings📝 Commits (1)
ac321f4Add check if images and avoid trying to calculate embeddings📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/files.py(+1 -1)📄 Description
Generated mages are now treated with the same flow as normal files, which allows to back them out via the DB process.
Unfortunately during the upload_file function it does the DB backup but also the embedding of files. Since images do not contain any text and there are no parsers defined for images, the process fails then trying to embed them.
This PR adds a filter to check if the uploaded files are images, and if they are do not try to calculate embeddings.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.