← All examples · Home

11. Custom embedder (M5)

The Embedder interface accepts any object with { dimension, embed(texts): Promise }. This lets you plug in a remote API, a custom model, a random baseline, or any other embedding source. Runs on CPU fallback (WASM-SIMD) if WebGPU is unavailable.

ready.