UNPKG

@langchain/community

Version:
1 lines • 1.57 kB
{"version":3,"file":"pptx.d.cts","names":["Document","BufferLoader","PPTXLoader","Blob","Buffer","Promise"],"sources":["../../../src/document_loaders/fs/pptx.d.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BufferLoader } from \"@langchain/classic/document_loaders/fs/buffer\";\n/**\n * A class that extends the `BufferLoader` class. It represents a document\n * loader that loads documents from PDF files.\n */\nexport declare class PPTXLoader extends BufferLoader {\n constructor(filePathOrBlob: string | Blob);\n /**\n * A method that takes a `raw` buffer and `metadata` as parameters and\n * returns a promise that resolves to an array of `Document` instances. It\n * uses the `parseOfficeAsync` function from the `officeparser` module to extract\n * the raw text content from the buffer. If the extracted powerpoint content is\n * empty, it returns an empty array. Otherwise, it creates a new\n * `Document` instance with the extracted powerpoint content and the provided\n * metadata, and returns it as an array.\n * @param raw The buffer to be parsed.\n * @param metadata The metadata of the document.\n * @returns A promise that resolves to an array of `Document` instances.\n */\n parse(raw: Buffer, metadata: Document[\"metadata\"]): Promise<Document[]>;\n}\n//# sourceMappingURL=pptx.d.ts.map"],"mappings":";;;;;;;AAMA;;AAceI,cAdMF,UAAAA,SAAmBD,YAAAA,CAczBG;EAAkBJ,WAAAA,CAAAA,cAAAA,EAAAA,MAAAA,GAbQG,IAaRH;EAA+BA;;;AAdZ;;;;;;;;;aAcrCI,kBAAkBJ,uBAAuBK,QAAQL"}