Documentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-openap-1765292790-ae6c60d.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
This example goes over how to load data from EPUB files. By default, one document will be created for each chapter in the EPUB file, you can change this behavior by setting the splitChapters option to false.
npm install @langchain/community @langchain/core epub2 html-to-text
Usage, one document per chapter
import { EPubLoader } from "@langchain/community/document_loaders/fs/epub";
const loader = new EPubLoader("src/document_loaders/example_data/example.epub");
const docs = await loader.load();
Usage, one document per file
import { EPubLoader } from "@langchain/community/document_loaders/fs/epub";
const loader = new EPubLoader(
"src/document_loaders/example_data/example.epub",
{
splitChapters: false,
}
);
const docs = await loader.load();