From a94e4161f778e646542037ef372533e2ab1061f9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 17 Feb 2024 21:31:46 -0800 Subject: [PATCH] fix: file content type issue --- backend/apps/rag/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/apps/rag/main.py b/backend/apps/rag/main.py index ec9e0a8b..f24b6b90 100644 --- a/backend/apps/rag/main.py +++ b/backend/apps/rag/main.py @@ -388,7 +388,9 @@ def scan_docs_dir(user=Depends(get_admin_user)): collection_name = calculate_sha256(f)[:63] f.close() - loader, known_type = get_loader(filename, file_content_type, str(path)) + loader, known_type = get_loader( + filename, file_content_type[0], str(path) + ) data = loader.load() result = store_data_in_vector_db(data, collection_name)