mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #1419] [MERGED] feat: improve embedding model update & resolve network dependency #43714
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/1419
Author: @ghost
Created: 4/4/2024
Status: ✅ Merged
Merged: 4/10/2024
Merged by: @tjbck
Base:
dev← Head:embedding-model-fix-and-manual-update📝 Commits (10+)
3b66aa5Improve embedding model update & resolve network dependencybcf79c8Format fixes075fbedMore format fixes9f82f5aFormatting...11741eaTooltip info & warn. Detect file path during update. Add translation.ec530acformat fix506a061Merge branch 'dev' into embedding-model-fix-and-manual-update48aad65refacf4b87ecrefacabfcceerefac📊 Changes
6 files changed (+424 additions, -196 deletions)
View changed files
📝
backend/apps/rag/main.py(+35 -13)📝
backend/apps/rag/utils.py(+42 -0)📝
backend/config.py(+6 -0)📝
src/lib/apis/rag/index.ts(+61 -0)📝
src/lib/components/documents/Settings/General.svelte(+273 -183)📝
src/lib/i18n/locales/en-US/translation.json(+7 -0)📄 Description
Pull Request Checklist
Description
Improve embedding model update & resolve network dependency. This permits uvicorn to start without network access and eliminates the network dependency. Huggingface will not be contacted unless manual update is initiated from the GUI/API or
RAG_EMBEDDING_MODEL_AUTO_UPDATEis set toTrue.The
huggingface_hubfunctionsnapshot_downloadis called directly to allow for control of thelocal_files_onlykwarg. Also, clean up RAG main.py to remove unused commented code and associated sentence_transformers direct import. Theembedding_model_get_path()is used to obtain the full filesystem path to the snapshot which, when passed to Chroma, doesn't attempt to download or update automatically.Relates to #1302 and may fix issues like #1122.
Changelog Entry
Added
RAG_EMBEDDING_MODEL_AUTO_UPDATEto control update behaviorembedding_model_get_path()function to output the filesystem path in addition to update of the model usinghuggingface_hubFixed
Changed
get_embedding_model()&update_embedding_model()Removed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.