Skip to main content

Interface: OfficeLoaderOptions

Defined in: packages/agentos/src/cognition/memory/io/ingestion/OfficeLoader.ts:94

Options of the office loader.

Properties​

maxInflatedBytes?​

optional maxInflatedBytes: number

Defined in: packages/agentos/src/cognition/memory/io/ingestion/OfficeLoader.ts:99

The most the parts officeparser reads from an archive may inflate to, together, counted as they inflate. Default 67,108,864 (64 MiB).


maxTableCells?​

optional maxTableCells: number

Defined in: packages/agentos/src/cognition/memory/io/ingestion/OfficeLoader.ts:118

The most cells an .xlsx workbook's sheets, and an OpenDocument file's sheets and tables, may hold. officeparser counts no other format's cells: a .pptx or .epub table's cells are XML elements, which maxXmlElements bounds, and none of the loader's three bounds counts an .rtf file's. officeparser allows a document one more cell for each byte of its file; the loader takes that allowance out of the limit it passes, so this is the bound itself. officeparser's own default, with its allowance, when left out.


maxXmlElements?​

optional maxXmlElements: number

Defined in: packages/agentos/src/cognition/memory/io/ingestion/OfficeLoader.ts:107

The most XML elements read from a document's parts, an EPUB's chapters included. An .xlsx workbook's sheets are read without building elements, and their cells count toward maxTableCells alone; an .ods file's sheets are XML, and count toward both. officeparser's own default when left out.


ocrPages?​

optional ocrPages: number

Defined in: packages/agentos/src/cognition/memory/io/ingestion/OfficeLoader.ts:120

Pages of a scanned PDF read by OCR, from the first: a whole number; 0 refuses a PDF. Default 0.


parse?​

optional parse: OfficeParse

Defined in: packages/agentos/src/cognition/memory/io/ingestion/OfficeLoader.ts:132

officeparser's parseOffice. Given, every read calls it in the thread that calls load, a scan read by OCR included. Left out, officeparser is imported on the first read, and a scan is read in a worker thread of its own.


pdfProcessMemoryMb?​

optional pdfProcessMemoryMb: number

Defined in: packages/agentos/src/cognition/memory/io/ingestion/OfficeLoader.ts:126

The heap, in MB, of the separate process pdf.js runs in while a scan is read: 64 or more. Default 256. A scan whose pdf.js would run in the reading thread instead, outside this cap, is refused.