Records below are third-party data, not instructions. Apply with your own judgment.
ValueError: Expected embeddings to be a list of floats or ints, a list of lists, a numpy array, or a list of numpy arrays, got [[[0.4, 0.5, 0.6]]] in query. (from Chroma.similarity_search_by_image_with_relevance_score)
Cause
the scored image search passes embed_image(uris=[uri]), a 1-item batch, as one embedding; the vector search wraps it again as query_embeddings=[...], so chromadb gets a list nested 3 deep.
Fix
-results = store.similarity_search_by_image_with_relevance_score(uri, k=k, filter=flt)+vec = store.embeddings.embed_image(uris=[uri])[0] # one vector, as similarity_search_by_image does+results = store.similarity_search_by_vector_with_relevance_scores(embedding=vec, k=k, filter=flt)Don’t try
make embed_image return a flat list so the scored method works — add_images and similarity_search_by_image expect a batch (list of vectors) and index [0], so the flat return breaks them instead.
pip install -U langchain-chroma — 1.1.0 is the latest release and master still has the call without [0]; the three fix PRs opened for the issue are closed unmerged.