Interface that defines the methods for loading and splitting documents.

interface DocumentLoader {
    load(): Promise<Document<Record<string, any>>[]>;
    loadAndSplit(textSplitter?: BaseDocumentTransformer<DocumentInterface<Record<string, any>>[], DocumentInterface<Record<string, any>>[]>): Promise<Document<Record<string, any>>[]>;
}

Implemented by

Methods

  • Returns Promise<Document<Record<string, any>>[]>

  • Parameters

    • OptionaltextSplitter: BaseDocumentTransformer<DocumentInterface<Record<string, any>>[], DocumentInterface<Record<string, any>>[]>

    Returns Promise<Document<Record<string, any>>[]>