chroma-core/chroma · error · ChromaValueError
Cannot embed string query for key '${key}': no embedding fun
Error message
Cannot embed string query for key '${key}': no embedding function configured. Provide an embedded vector or configure an embedding function. What it means
Error "Cannot embed string query for key '${key}': no embedding function configured. Provide an embedded vector or configure an embedding function." thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/chromadb/src/collection.ts:697
}
const vectorIndex = valueTypes.floatList?.vectorIndex;
if (vectorIndex?.enabled && vectorIndex.config.embeddingFunction) {
const embeddingFunction = vectorIndex.config.embeddingFunction;
const embeddings = embeddingFunction.generateForQueries
? await embeddingFunction.generateForQueries([queryValue])
: await embeddingFunction.generate([queryValue]);
if (!embeddings || embeddings.length !== 1) {
throw new ChromaValueError(
"Embedding function returned unexpected number of embeddings.",
);
}
return { ...knn, query: embeddings[0] };
}
throw new ChromaValueError(
`Cannot embed string query for key '${key}': no embedding function configured. Provide an embedded vector or configure an embedding function.`,
);
}
private async embedRankLiteral(rank: unknown): Promise<unknown> {
if (rank === null || rank === undefined) {
return rank;
}
if (Array.isArray(rank)) {
return Promise.all(rank.map((item) => this.embedRankLiteral(item)));
}
if (!isPlainObject(rank)) {
return rank;
}
const entries = await Promise.all(View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/chromadb/src/collection.ts:697 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/cd09d22ef8861aae.
Report an issue: GitHub.