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

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

filePath: string

Methods

  • A method that loads the EPUB file and returns a promise that resolves to an array of Document instances.

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

    A promise that resolves to an array of Document instances.

  • Loads the documents and splits them using a specified text splitter.

    Parameters

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

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

  • 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<{
        pageContent: string;
        metadata?: object;
    }[]>

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

Generated using TypeDoc