add RAG: cpu/cuda/mps as a config variable rather than hardcode #499

Closed
opened 2025-11-11 14:23:05 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @drawingthesun on GitHub (Mar 19, 2024).

File: backend/config.py has the following hardcoded variable:

RAG_EMBEDDING_MODEL_DEVICE_TYPE = os.environ.get(
    "RAG_EMBEDDING_MODEL_DEVICE_TYPE", "cpu"
)

I use open-webui locally without Docker, and whenever I do an update I have config.py replaced, however the hardcoded variable I have to change everytime to "mps" and I forget a lot of the time.

Originally created by @drawingthesun on GitHub (Mar 19, 2024). File: `backend/config.py` has the following hardcoded variable: ```python RAG_EMBEDDING_MODEL_DEVICE_TYPE = os.environ.get( "RAG_EMBEDDING_MODEL_DEVICE_TYPE", "cpu" ) ``` I use open-webui locally without Docker, and whenever I do an update I have config.py replaced, however the hardcoded variable I have to change everytime to "mps" and I forget a lot of the time.
Author
Owner

@jannikstdl commented on GitHub (Mar 19, 2024):

Related #1165

@jannikstdl commented on GitHub (Mar 19, 2024): Related #1165
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#499