@langchain/community
Version:
Third-party integrations for LangChain.js
1 lines • 1.04 kB
Source Map (JSON)
{"version":3,"file":"notion.cjs","names":["DirectoryLoader","TextLoader","UnknownHandling"],"sources":["../../../src/document_loaders/fs/notion.ts"],"sourcesContent":["import {\n DirectoryLoader,\n UnknownHandling,\n} from \"@langchain/classic/document_loaders/fs/directory\";\nimport { TextLoader } from \"@langchain/classic/document_loaders/fs/text\";\n\n/**\n * A class that extends the DirectoryLoader class. It represents a\n * document loader that loads documents from a directory in the Notion\n * format. It uses the TextLoader for loading '.md' files and ignores\n * unknown file types.\n */\nexport class NotionLoader extends DirectoryLoader {\n constructor(directoryPath: string) {\n super(\n directoryPath,\n {\n \".md\": (filePath) => new TextLoader(filePath),\n },\n true,\n UnknownHandling.Ignore\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAa,eAAb,cAAkCA,iDAAAA,gBAAgB;CAChD,YAAY,eAAuB;AACjC,QACE,eACA,EACE,QAAQ,aAAa,IAAIC,4CAAAA,WAAW,SAAS,EAC9C,EACD,MACAC,iDAAAA,gBAAgB,OACjB"}