Initialize support for prefixing embeddings

This commit is contained in:
jvinolus
2025-01-15 17:05:04 -08:00
parent 4269df041f
commit 47b8412695
3 changed files with 35 additions and 20 deletions
+2 -1
View File
@@ -79,6 +79,7 @@ from open_webui.config import (
RAG_RERANKING_MODEL_TRUST_REMOTE_CODE,
UPLOAD_DIR,
DEFAULT_LOCALE,
RAG_EMBEDDING_PASSAGE_PREFIX
)
from open_webui.env import (
SRC_LOG_LEVELS,
@@ -775,7 +776,7 @@ def save_docs_to_vector_db(
)
embeddings = embedding_function(
list(map(lambda x: x.replace("\n", " "), texts))
list(map(lambda x: x.replace("\n", " "), texts)), RAG_EMBEDDING_PASSAGE_PREFIX
)
items = [