Files
fil/docs/snippets/wasm/utils/token_reduction.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

16 lines
299 B
Markdown

```typescript title="WASM"
import init, { extractFile } from "kreuzberg-wasm";
await init();
const config = {
tokenReduction: {
mode: "moderate",
preserveImportantWords: true,
},
};
const result = await extractFile("document.pdf", undefined, config);
console.log(result.content);
```