From 2e7af7bdbf506d2ea8c2e5d0ac90ef78780a28ab Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 21 Nov 2024 22:03:51 -0800 Subject: [PATCH] fix --- backend/open_webui/apps/retrieval/main.py | 4 ++-- backend/open_webui/apps/retrieval/utils.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/apps/retrieval/main.py b/backend/open_webui/apps/retrieval/main.py index a4be5e87c..63bc18190 100644 --- a/backend/open_webui/apps/retrieval/main.py +++ b/backend/open_webui/apps/retrieval/main.py @@ -893,7 +893,7 @@ def process_file( # Update the content in the file # Usage: /files/{file_id}/data/content/update - VECTOR_DB_CLIENT.delete(collection_name=f"file-{file.id}") + VECTOR_DB_CLIENT.delete_collection(collection_name=f"file-{file.id}") docs = [ Document( @@ -1015,7 +1015,7 @@ def process_file( return { "status": True, "collection_name": collection_name, - "filename": file.meta.get("name", file.filename), + "filename": file.filename, "content": text_content, } except Exception as e: diff --git a/backend/open_webui/apps/retrieval/utils.py b/backend/open_webui/apps/retrieval/utils.py index e4e36fbfd..420ed7bf4 100644 --- a/backend/open_webui/apps/retrieval/utils.py +++ b/backend/open_webui/apps/retrieval/utils.py @@ -483,7 +483,6 @@ def generate_ollama_batch_embeddings( r.raise_for_status() data = r.json() - print(data) if "embeddings" in data: return data["embeddings"] else: