mirror of
https://github.com/open-webui/open-webui
synced 2024-12-29 15:25:29 +00:00
turn off auto update in offline mode
This commit is contained in:
parent
29a2719595
commit
edf6c6a18c
@ -21,6 +21,7 @@ from open_webui.env import (
|
|||||||
WEBUI_NAME,
|
WEBUI_NAME,
|
||||||
log,
|
log,
|
||||||
DATABASE_URL,
|
DATABASE_URL,
|
||||||
|
OFFLINE_MODE
|
||||||
)
|
)
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from sqlalchemy import JSON, Column, DateTime, Integer, func
|
from sqlalchemy import JSON, Column, DateTime, Integer, func
|
||||||
@ -1197,7 +1198,7 @@ RAG_EMBEDDING_MODEL = PersistentConfig(
|
|||||||
log.info(f"Embedding model set: {RAG_EMBEDDING_MODEL.value}")
|
log.info(f"Embedding model set: {RAG_EMBEDDING_MODEL.value}")
|
||||||
|
|
||||||
RAG_EMBEDDING_MODEL_AUTO_UPDATE = (
|
RAG_EMBEDDING_MODEL_AUTO_UPDATE = (
|
||||||
os.environ.get("RAG_EMBEDDING_MODEL_AUTO_UPDATE", "True").lower() == "true"
|
not OFFLINE_MODE and os.environ.get("RAG_EMBEDDING_MODEL_AUTO_UPDATE", "True").lower() == "true"
|
||||||
)
|
)
|
||||||
|
|
||||||
RAG_EMBEDDING_MODEL_TRUST_REMOTE_CODE = (
|
RAG_EMBEDDING_MODEL_TRUST_REMOTE_CODE = (
|
||||||
@ -1222,7 +1223,7 @@ if RAG_RERANKING_MODEL.value != "":
|
|||||||
log.info(f"Reranking model set: {RAG_RERANKING_MODEL.value}")
|
log.info(f"Reranking model set: {RAG_RERANKING_MODEL.value}")
|
||||||
|
|
||||||
RAG_RERANKING_MODEL_AUTO_UPDATE = (
|
RAG_RERANKING_MODEL_AUTO_UPDATE = (
|
||||||
os.environ.get("RAG_RERANKING_MODEL_AUTO_UPDATE", "True").lower() == "true"
|
not OFFLINE_MODE and os.environ.get("RAG_RERANKING_MODEL_AUTO_UPDATE", "True").lower() == "true"
|
||||||
)
|
)
|
||||||
|
|
||||||
RAG_RERANKING_MODEL_TRUST_REMOTE_CODE = (
|
RAG_RERANKING_MODEL_TRUST_REMOTE_CODE = (
|
||||||
@ -1686,7 +1687,7 @@ WHISPER_MODEL = PersistentConfig(
|
|||||||
|
|
||||||
WHISPER_MODEL_DIR = os.getenv("WHISPER_MODEL_DIR", f"{CACHE_DIR}/whisper/models")
|
WHISPER_MODEL_DIR = os.getenv("WHISPER_MODEL_DIR", f"{CACHE_DIR}/whisper/models")
|
||||||
WHISPER_MODEL_AUTO_UPDATE = (
|
WHISPER_MODEL_AUTO_UPDATE = (
|
||||||
os.environ.get("WHISPER_MODEL_AUTO_UPDATE", "").lower() == "true"
|
not OFFLINE_MODE and os.environ.get("WHISPER_MODEL_AUTO_UPDATE", "").lower() == "true"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user