A class that extends the BaseDocumentLoader class. It represents a document loader that loads documents from EPUB files.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

filePath: string

Methods

  • Parameters

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

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

    A Promise that resolves with an array of Document instances, each split according to the provided TextSplitter.

    Use this.load() and splitter.splitDocuments() individually. Loads the documents and splits them using a specified text splitter.

  • A protected method that takes an EPUB object as a parameter and returns a promise that resolves to an array of objects representing the content and metadata of each chapter.

    Parameters

    • epub: EPub

      The EPUB object to parse.

    Returns Promise<{
        metadata?: object;
        pageContent: string;
    }[]>

    A promise that resolves to an array of objects representing the content and metadata of each chapter.