chroma-core/chroma · error · ValueError
Google PaLM only supports text documents, not images
Error message
Google PaLM only supports text documents, not images
What it means
Error "Google PaLM only supports text documents, not images" thrown in chroma-core/chroma.
Source
Thrown at chromadb/utils/embedding_functions/google_embedding_function.py:432
palm.configure(
api_key=self.api_key,
client_options={"headers": {"x-goog-api-client": f"chroma/{__version__}"}},
)
self._palm = palm
def __call__(self, input: Documents) -> Embeddings:
"""
Generate embeddings for the given documents.
Args:
input: Documents or images to generate embeddings for.
Returns:
Embeddings for the documents.
"""
# Google PaLM only works with text documents
if not all(isinstance(item, str) for item in input):
raise ValueError("Google PaLM only supports text documents, not images")
return [
np.array(
self._palm.generate_embeddings(model=self.model_name, text=text)[
"embedding"
],
dtype=np.float32,
)
for text in input
]
@staticmethod
def name() -> str:
return "google_palm"
def default_space(self) -> Space:
return "cosine"
View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at chromadb/utils/embedding_functions/google_embedding_function.py:432 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/754f93078c09943b.
Report an issue: GitHub.