Fix: Restore Notion and Slack directory loaders.

This commit is contained in:
Snow 2023-06-11 13:48:02 +10:00
commit 1427599b8a

View file

@ -42,6 +42,7 @@ class DocumentLoaderFrontNode(FrontendNode):
suffixes=[".pptx", ".ppt"], fileTypes=["pptx", "ppt"] suffixes=[".pptx", ".ppt"], fileTypes=["pptx", "ppt"]
), ),
"SRTLoader": build_template(suffixes=[".srt"], fileTypes=["srt"]), "SRTLoader": build_template(suffixes=[".srt"], fileTypes=["srt"]),
"SlackDirectoryLoader": build_template(suffixes=[".zip"], fileTypes=["zip"]),
"TelegramChatLoader": build_template(suffixes=[".json"], fileTypes=["json"]), "TelegramChatLoader": build_template(suffixes=[".json"], fileTypes=["json"]),
"TextLoader": build_template(suffixes=[".txt"], fileTypes=["txt"]), "TextLoader": build_template(suffixes=[".txt"], fileTypes=["txt"]),
"UnstructuredWordDocumentLoader": build_template( "UnstructuredWordDocumentLoader": build_template(
@ -64,7 +65,10 @@ class DocumentLoaderFrontNode(FrontendNode):
name = "web_path" name = "web_path"
elif self.template.type_name in {"GitbookLoader"}: elif self.template.type_name in {"GitbookLoader"}:
name = "web_page" name = "web_page"
elif self.template.type_name in {"ReadTheDocsLoader"}: elif self.template.type_name in {
"ReadTheDocsLoader",
"NotionDirectoryLoader",
}:
name = "path" name = "path"
if name: if name:
self.template.add_field( self.template.add_field(