chroma-core/chroma · error · ValueError

URL must be provided for HuggingFaceEmbeddingServer

Error message

URL must be provided for HuggingFaceEmbeddingServer

What it means

Error "URL must be provided for HuggingFaceEmbeddingServer" thrown in chroma-core/chroma.

Source

Thrown at chromadb/utils/embedding_functions/huggingface_embedding_function.py:219

        # Convert to numpy arrays
        return [np.array(embedding, dtype=np.float32) for embedding in response]

    @staticmethod
    def name() -> str:
        return "huggingface_server"

    def default_space(self) -> Space:
        return "cosine"

    def supported_spaces(self) -> List[Space]:
        return ["cosine", "l2", "ip"]

    @staticmethod
    def build_from_config(config: Dict[str, Any]) -> "EmbeddingFunction[Documents]":
        url = config.get("url")
        api_key_env_var = config.get("api_key_env_var")
        if url is None:
            raise ValueError("URL must be provided for HuggingFaceEmbeddingServer")

        return HuggingFaceEmbeddingServer(url=url, api_key_env_var=api_key_env_var)

    def get_config(self) -> Dict[str, Any]:
        return {"url": self.url, "api_key_env_var": self.api_key_env_var}

    def validate_config_update(
        self, old_config: Dict[str, Any], new_config: Dict[str, Any]
    ) -> None:
        if "url" in new_config and new_config["url"] != self.url:
            raise ValueError(
                "The URL cannot be changed after the embedding function has been initialized."
            )

    @staticmethod
    def validate_config(config: Dict[str, Any]) -> None:
        """
        Validate the configuration using the JSON schema.

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at chromadb/utils/embedding_functions/huggingface_embedding_function.py:219 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/813444f611939635. Report an issue: GitHub.