浏览代码

fix: encoding issue

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

+ 1 - 1
backend/apps/rag/main.py

@@ -411,7 +411,7 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
     elif file_ext == "xml":
         loader = UnstructuredXMLLoader(file_path)
     elif file_ext in ["htm", "html"]:
-        loader = BSHTMLLoader(file_path)
+        loader = BSHTMLLoader(file_path, open_encoding="unicode_escape")
     elif file_ext == "md":
         loader = UnstructuredMarkdownLoader(file_path)
     elif file_content_type == "application/epub+zip":