Skip to content

EmbedFunction

EmbedFunction = (text) => readonly number[] | Promise<readonly number[]>

Defined in: retrievers/embedding-retriever.ts:8

An embedding function maps text to a fixed-length dense vector. It may be synchronous or asynchronous so callers can plug in a real provider or a deterministic stub for reproducible evaluation runs.

string

readonly number[] | Promise<readonly number[]>