Files
fil/docs/snippets/wasm/utils/chunking.md

16 lines
313 B
Markdown
Raw Normal View History

2026-06-01 23:40:55 +02:00
```typescript title="WASM"
import init, { extractFile } from "kreuzberg-wasm";
await init();
const config = {
chunking: {
maxChars: 1500,
chunkOverlap: 200,
},
};
const result = await extractFile("document.pdf", undefined, config);
console.log(`Chunks created: ${result.chunks?.length ?? 0}`);
```