chroma-core/chroma · error · Error
Failed to generate embeddings: ${response.statusText}
Error message
Failed to generate embeddings: ${response.statusText} What it means
Error "Failed to generate embeddings: ${response.statusText}" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/ai-embeddings/huggingface-server/src/index.ts:47
const apiKey =
args.apiKey || (this.apiKeyEnvVar && process.env[this.apiKeyEnvVar]);
this.headers = {
"Content-Type": "application/json",
Authorization: apiKey ? `Bearer ${apiKey}` : undefined,
};
}
public async generate(texts: string[]): Promise<number[][]> {
const response = await fetch(this.url, {
method: "POST",
headers: this.headers,
body: JSON.stringify({ inputs: texts }),
});
if (!response.ok) {
throw new Error(`Failed to generate embeddings: ${response.statusText}`);
}
return await response.json();
}
public defaultSpace(): EmbeddingFunctionSpace {
return "cosine";
}
public supportedSpaces(): EmbeddingFunctionSpace[] {
return ["cosine", "l2", "ip"];
}
public static buildFromConfig(
config: HuggingfaceServerConfig,
): HuggingfaceServerEmbeddingFunction {
return new HuggingfaceServerEmbeddingFunction({
url: config.url,View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/ai-embeddings/huggingface-server/src/index.ts:47 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/cc9aa95010d9feb6.
Report an issue: GitHub.