diff --git a/backend/open_webui/apps/rag/main.py b/backend/open_webui/apps/rag/main.py index 74855b336..4efa1d81c 100644 --- a/backend/open_webui/apps/rag/main.py +++ b/backend/open_webui/apps/rag/main.py @@ -1112,13 +1112,15 @@ def store_docs_in_vector_db( app.state.config.RAG_EMBEDDING_OPENAI_BATCH_SIZE, ) + embedding_texts = list(map(lambda x: x.replace("\n", " "), texts)) + VECTOR_DB_CLIENT.insert( collection_name=collection_name, items=[ { "id": str(uuid.uuid4()), "text": text, - "vector": embedding_function(text.replace("\n", " ")), + "vector": embedding_texts[idx], "metadata": metadatas[idx], } for idx, text in enumerate(texts) diff --git a/backend/open_webui/apps/rag/utils.py b/backend/open_webui/apps/rag/utils.py index 73ccfad38..f9443d380 100644 --- a/backend/open_webui/apps/rag/utils.py +++ b/backend/open_webui/apps/rag/utils.py @@ -76,8 +76,6 @@ def query_doc( limit=k, ) - print("result", result) - log.info(f"query_doc:result {result}") return result except Exception as e: diff --git a/backend/open_webui/apps/rag/vector/dbs/milvus.py b/backend/open_webui/apps/rag/vector/dbs/milvus.py index f205b9521..33ec6035a 100644 --- a/backend/open_webui/apps/rag/vector/dbs/milvus.py +++ b/backend/open_webui/apps/rag/vector/dbs/milvus.py @@ -16,8 +16,6 @@ class MilvusClient: self.client = Client(uri=MILVUS_URI) def _result_to_get_result(self, result) -> GetResult: - print(result) - ids = [] documents = [] metadatas = [] @@ -45,8 +43,6 @@ class MilvusClient: ) def _result_to_search_result(self, result) -> SearchResult: - print(result) - ids = [] distances = [] documents = []