PPTX 文件
¥PPTX files
本示例介绍如何从 PPTX 文件加载数据。默认情况下,PPTX 文件中的所有页面都会创建一个文档。
¥This example goes over how to load data from PPTX files. By default, one document will be created for all pages in the PPTX file.
设置
¥Setup
- npm
- Yarn
- pnpm
npm install officeparser
yarn add officeparser
pnpm add officeparser
用法,每页一个文档
¥Usage, one document per page
import { PPTXLoader } from "@langchain/community/document_loaders/fs/pptx";
const loader = new PPTXLoader("src/document_loaders/example_data/example.pptx");
const docs = await loader.load();