chroma-core/chroma · error · Error

Error calling Chroma Embedding API: ${error.message}

Error message

Error calling Chroma Embedding API: ${error.message}

What it means

Error "Error calling Chroma Embedding API: ${error.message}" thrown in chroma-core/chroma.

Source

Thrown at clients/new-js/packages/ai-embeddings/chroma-cloud-splade/src/index.ts:157

      // Validate response structure
      if (!data || typeof data !== "object") {
        throw new Error("Invalid response format: expected object");
      }

      if (!Array.isArray(data.embeddings)) {
        throw new Error(
          "Invalid response format: missing or invalid embeddings array",
        );
      }

      // Sort the sparse vectors to match Python behavior
      sortSparseVectors(data.embeddings);

      return data.embeddings;
    } catch (error) {
      if (error instanceof Error) {
        throw new Error(`Error calling Chroma Embedding API: ${error.message}`);
      } else {
        throw new Error(`Error calling Chroma Embedding API: ${error}`);
      }
    }
  }

  public async generateForQueries(texts: string[]): Promise<SparseVector[]> {
    return this.generate(texts);
  }

  public static buildFromConfig(
    config: ChromaCloudSpladeConfig,
    client?: ChromaClient,
  ): ChromaCloudSpladeEmbeddingFunction {
    return new ChromaCloudSpladeEmbeddingFunction({
      model: config.model,
      apiKeyEnvVar: config.api_key_env_var,
      client,

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at clients/new-js/packages/ai-embeddings/chroma-cloud-splade/src/index.ts:157 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/a1ddbab43b72a276. Report an issue: GitHub.