PreprocessingOptions
Defined in: src/lib/processors/types.ts:74
Options for file preprocessing
Properties
keepOriginalFiles?
optionalkeepOriginalFiles:boolean
Defined in: src/lib/processors/types.ts:85
Whether to keep original file attachments (default: true)
maxExtractedCharsPerFile?
optionalmaxExtractedCharsPerFile:number
Defined in: src/lib/processors/types.ts:97
Max characters of extracted text kept per file (default: 100,000). Longer text is cut and
ends with a [truncated: …] marker naming how much was kept.
maxExtractedCharsTotal?
optionalmaxExtractedCharsTotal:number
Defined in: src/lib/processors/types.ts:105
Max characters of extractedContent across all files of one preprocessing run
(default: 200,000), counting each file’s header, separator and truncation marker, not just
its text. Files are cut in order; files that find the budget already spent get no section of
their own — one combined [truncated: …] line names them, and their status is truncated.
maxFileSizeBytes?
optionalmaxFileSizeBytes:number
Defined in: src/lib/processors/types.ts:88
Max file size to process in bytes (default: 10MB)
onError()?
optionalonError: (fileName:string,error:Error) =>void
Defined in: src/lib/processors/types.ts:111
Callback for errors (non-fatal)
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
Returns
void
onProgress()?
optionalonProgress: (current:number,total:number,fileName:string) =>void
Defined in: src/lib/processors/types.ts:108
Callback for progress updates
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
|
|
|
|
Returns
void
processors?
optionalprocessors:FileProcessor[] |null
Defined in: src/lib/processors/types.ts:82
Processors to use.
- undefined (default): Use all built-in processors
- null or []: Disable preprocessing (every non-image file is reported
skipped/unsupported_typeinfileStatuses) - FileProcessor[]: Use specific processors
timeoutMs?
optionaltimeoutMs:number
Defined in: src/lib/processors/types.ts:91
Timeout per file in milliseconds (default: 30000). Prevents hangs from slow CDN workers or large files.