chroma-core / chroma-core/chroma
[Bug]: Metadatas array
- Dominant language
- Rust
- Stars
- 29.3k
- Forks
- 2.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 38
Description
### What happened?
I try add items to collection:
https://docs.trychroma.com/docs/querying-collections/metadata-filtering
```
await collection.add({
ids: ["m1", "m2", "m3"],
embeddings: [[1, 0, 0], [0, 1, 0], [0, 0, 1]],
metadatas: [
{ genres: ["action", "comedy"], year: 2020 },
{ genres: ["drama"], year: 2021 },
{ genres: ["action", "thriller"], year: 2022 },
],
});
```
Response:
```
Uncaught ChromaClientError ChromaClientError: Failed to deserialize the JSON body into the target type: metadatas[0].genres: data did not match any variant of untagged enum MetadataValue at line 1 column 138
at chromaFetch (xxxx/utils/chromadb-report/node_modules/chromadb/dist/cjs/chromadb.cjs:4749:15)
at processTicksAndRejections (/internal/process/task_queues:105:5)
````
Array is not supported ?
### Versions
lastest chromaclient (js): "chromadb": "^3.3.0"
lastest chromadb server
### Relevant log output
```shell
Uncaught ChromaClientError ChromaClientError: Failed to deserialize the JSON body into the target type: metadatas[0].genres: data did not match any variant of untagged enum MetadataValue at line 1 column 138
at chromaFetch (xxxx/utils/chromadb-report/node_modules/chromadb/dist/cjs/chromadb.cjs:4749:15)
at processTicksAndRejections (/internal/process/task_queues:105:5)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported JavaScript example against the latest Chroma client and server, starting with the metadata-filtering documentation and the deserialization error in the stack trace. The payload names no source file or test, so trace the metadata validation path and verify the array input's intended behavior with coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust
- Domain
- api, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100