Docx 文件
此示例介绍如何从 docx 文件加载数据。
设置
- npm
- Yarn
- pnpm
npm install @langchain/community @langchain/core mammoth
yarn add @langchain/community @langchain/core mammoth
pnpm add @langchain/community @langchain/core mammoth
用法
import { DocxLoader } from "@langchain/community/document_loaders/fs/docx";
const loader = new DocxLoader(
"src/document_loaders/tests/example_data/attention.docx"
);
const docs = await loader.load();