@langchain/core
Version:
Core LangChain.js abstractions and schemas
1 lines • 832 B
Source Map (JSON)
{"version":3,"file":"base.cjs","names":[],"sources":["../../src/document_loaders/base.ts"],"sourcesContent":["import { Document } from \"../documents/document.js\";\n\n/**\n * Interface that defines the methods for loading and splitting documents.\n */\nexport interface DocumentLoader {\n load(): Promise<Document[]>;\n}\n\n/**\n * Abstract class that provides a default implementation for the\n * loadAndSplit() method from the DocumentLoader interface. The load()\n * method is left abstract and needs to be implemented by subclasses.\n */\nexport abstract class BaseDocumentLoader implements DocumentLoader {\n /**\n * Loads the documents.\n * @returns A Promise that resolves with an array of Document instances.\n */\n abstract load(): Promise<Document[]>;\n}\n"],"mappings":";;;;;;;;;;AAcA,IAAsB,qBAAtB,MAAmE,CAMlE"}