From 491cff8c63f744e93fa16fefa04f7480c7609143 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 28 Oct 2024 05:50:56 -0700 Subject: [PATCH] refac: parse md files with TextLoader --- backend/open_webui/apps/retrieval/loaders/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/apps/retrieval/loaders/main.py b/backend/open_webui/apps/retrieval/loaders/main.py index f0e8f804e..36f03cbb2 100644 --- a/backend/open_webui/apps/retrieval/loaders/main.py +++ b/backend/open_webui/apps/retrieval/loaders/main.py @@ -159,7 +159,7 @@ class Loader: elif file_ext in ["htm", "html"]: loader = BSHTMLLoader(file_path, open_encoding="unicode_escape") elif file_ext == "md": - loader = UnstructuredMarkdownLoader(file_path) + loader = TextLoader(file_path, autodetect_encoding=True) elif file_content_type == "application/epub+zip": loader = UnstructuredEPubLoader(file_path) elif (