chroma-core/chroma · error · Error
Failed to generate Gemini embeddings
Error message
Failed to generate Gemini embeddings
What it means
Error "Failed to generate Gemini embeddings" thrown in chroma-core/chroma.
Source
Thrown at clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts:91
model: this.modelName,
contents: texts,
config:
this.taskType || this.dimension
? {
...(this.taskType && { taskType: this.taskType }),
...(this.dimension && { outputDimensionality: this.dimension }),
}
: undefined,
});
} catch (e) {
throw new Error(`Failed to generate Gemini embeddings: ${e}`);
}
if (
!result.embeddings ||
!result.embeddings.every((e) => e.values !== undefined)
) {
throw new Error("Failed to generate Gemini embeddings");
}
return result.embeddings.map((e) => e.values as number[]);
}
public static buildFromConfig(
config: GoogleGeminiConfig,
): GoogleGeminiEmbeddingFunction {
return new GoogleGeminiEmbeddingFunction({
modelName: config.model_name,
apiKeyEnvVar: config.api_key_env_var,
taskType: config.task_type,
dimension: config.dimension,
});
}
public defaultSpace(): EmbeddingFunctionSpace {
return "cosine";View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at clients/new-js/packages/ai-embeddings/google-gemini/src/index.ts:91 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/1fc7da30a671f934.
Report an issue: GitHub.