Browse Source

refac: parse md files with TextLoader

Timothy J. Baek 6 months ago
parent
commit
491cff8c63
1 changed files with 1 additions and 1 deletions
  1. 1 1
      backend/open_webui/apps/retrieval/loaders/main.py

+ 1 - 1
backend/open_webui/apps/retrieval/loaders/main.py

@@ -159,7 +159,7 @@ class Loader:
             elif file_ext in ["htm", "html"]:
             elif file_ext in ["htm", "html"]:
                 loader = BSHTMLLoader(file_path, open_encoding="unicode_escape")
                 loader = BSHTMLLoader(file_path, open_encoding="unicode_escape")
             elif file_ext == "md":
             elif file_ext == "md":
-                loader = UnstructuredMarkdownLoader(file_path)
+                loader = TextLoader(file_path, autodetect_encoding=True)
             elif file_content_type == "application/epub+zip":
             elif file_content_type == "application/epub+zip":
                 loader = UnstructuredEPubLoader(file_path)
                 loader = UnstructuredEPubLoader(file_path)
             elif (
             elif (