chroma-core / chroma-core/chroma
[Feature Request]: Combine `queryTexts` and `queryEmbeddings` into a single `query` field in the interface for the queryRecords method.
- Dominant language
- Rust
- Stars
- 29.3k
- Forks
- 2.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 38
Description
### Describe the problem
Today, in the JS client library at least, the there is a `queryTexts` property and a `queryEmbeddings` property. The logic of the client is such that exactly one of them need to be supplied.
### Describe the proposed solution
I think it would clean up the interface a bit and make it clearer to callers if there were just a single `query` that could accept either `queryTexts` or `queryEmbeddings` and do the right thing according to whether it was an array of strings or an array of array of numbers supplied.
### Alternatives considered
_No response_
### Importance
nice to have
### Additional Information
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in the JS client at the queryRecords method and inspect how its queryTexts and queryEmbeddings inputs are defined and selected. Trace the related query interface and its callers to determine the compatible query shape; the work is done when one query field accepts either supported array form and the previous mutually exclusive inputs are consistently handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100