From 2fe01b4a50d4892a09b9f931f5f903080eb41551 Mon Sep 17 00:00:00 2001 From: Pieter Kuppens Date: Fri, 21 Feb 2025 11:59:49 +0100 Subject: [PATCH] Add Markdown .md files to the default list of documents for RAG Add .md extension to files that are read for RAG. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/NVIDIA/ChatRTX?shareId=XXXX-XXXX-XXXX-XXXX). --- ChatRTX_APIs/ChatRTX/chatrtx_rag.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChatRTX_APIs/ChatRTX/chatrtx_rag.py b/ChatRTX_APIs/ChatRTX/chatrtx_rag.py index c525ab8..c72303c 100644 --- a/ChatRTX_APIs/ChatRTX/chatrtx_rag.py +++ b/ChatRTX_APIs/ChatRTX/chatrtx_rag.py @@ -225,7 +225,7 @@ def _load_documents(self, folder_path): file_metadata = lambda x: {"filename": x} documents = SimpleDirectoryReader(folder_path, file_metadata=file_metadata, recursive=True, - required_exts=[".pdf", ".doc", ".docx", ".txt", ".xml"]).load_data() + required_exts=[".pdf", ".doc", ".docx", ".txt", ".xml", ".md"]).load_data() else: self._logger.info("No files found in the directory. Initializing an empty index.") documents = []