mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
refac: do not change default behaviour
This commit is contained in:
parent
29cbdbcadd
commit
600409682e
@ -95,8 +95,8 @@ from config import (
|
||||
TIKA_SERVER_URL,
|
||||
RAG_TOP_K,
|
||||
RAG_RELEVANCE_THRESHOLD,
|
||||
RAG_MAX_FILE_SIZE,
|
||||
RAG_MAX_FILE_COUNT,
|
||||
RAG_FILE_MAX_SIZE,
|
||||
RAG_FILE_MAX_COUNT,
|
||||
RAG_EMBEDDING_ENGINE,
|
||||
RAG_EMBEDDING_MODEL,
|
||||
RAG_EMBEDDING_MODEL_AUTO_UPDATE,
|
||||
@ -145,8 +145,8 @@ app.state.config = AppConfig()
|
||||
|
||||
app.state.config.TOP_K = RAG_TOP_K
|
||||
app.state.config.RELEVANCE_THRESHOLD = RAG_RELEVANCE_THRESHOLD
|
||||
app.state.config.MAX_FILE_SIZE = RAG_MAX_FILE_SIZE
|
||||
app.state.config.MAX_FILE_COUNT = RAG_MAX_FILE_COUNT
|
||||
app.state.config.MAX_FILE_SIZE = RAG_FILE_MAX_SIZE
|
||||
app.state.config.MAX_FILE_COUNT = RAG_FILE_MAX_COUNT
|
||||
|
||||
app.state.config.ENABLE_RAG_HYBRID_SEARCH = ENABLE_RAG_HYBRID_SEARCH
|
||||
app.state.config.ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION = (
|
||||
|
@ -1005,16 +1005,24 @@ ENABLE_RAG_HYBRID_SEARCH = PersistentConfig(
|
||||
os.environ.get("ENABLE_RAG_HYBRID_SEARCH", "").lower() == "true",
|
||||
)
|
||||
|
||||
RAG_MAX_FILE_COUNT = PersistentConfig(
|
||||
"RAG_MAX_FILE_COUNT",
|
||||
"rag.max_file_count",
|
||||
int(os.environ.get("RAG_MAX_FILE_COUNT", "5")),
|
||||
RAG_FILE_MAX_COUNT = PersistentConfig(
|
||||
"RAG_FILE_MAX_COUNT",
|
||||
"rag.file.max_count",
|
||||
(
|
||||
int(os.environ.get("RAG_FILE_MAX_COUNT"))
|
||||
if os.environ.get("RAG_FILE_MAX_COUNT")
|
||||
else None
|
||||
),
|
||||
)
|
||||
|
||||
RAG_MAX_FILE_SIZE = PersistentConfig(
|
||||
"RAG_MAX_FILE_SIZE",
|
||||
"rag.max_file_size",
|
||||
int(os.environ.get("RAG_MAX_FILE_SIZE", "10")),
|
||||
RAG_FILE_MAX_SIZE = PersistentConfig(
|
||||
"RAG_FILE_MAX_SIZE",
|
||||
"rag.file.max_size",
|
||||
(
|
||||
int(os.environ.get("RAG_FILE_MAX_SIZE"))
|
||||
if os.environ.get("RAG_FILE_MAX_SIZE")
|
||||
else None
|
||||
),
|
||||
)
|
||||
|
||||
ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION = PersistentConfig(
|
||||
|
Loading…
Reference in New Issue
Block a user