浏览代码

fix: file content type issue

Timothy J. Baek 1 年之前
父节点
当前提交
a94e4161f7
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      backend/apps/rag/main.py

+ 3 - 1
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)