chroma-core / chroma

the AI-native open-source embedding database
https://www.trychroma.com/
Apache License 2.0
14.48k stars 1.21k forks source link

[Feature Request]: Ability to query by text in the rest API #967

Open joesamcoke opened 1 year ago

joesamcoke commented 1 year ago

Describe the problem

Not sure if this is intentional, bug or documentation issue but when using the /api/v1/collections/{collection_id}/query endpoint in the rest API there is no option to query by text only embeddings. Seems strange to be able to add to a collection using text input so the embeddings are generated automatically but not be able to query in the same manner.

Describe the proposed solution

I would like to be able to have the ability to query by text in the rest API

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

tazarov commented 1 year ago

Hey @joesamcoke, in the current client/server model, the embeddings are generated on the client side as such, the server technically only works with embeddings, so what you are seeing is actually accurate and intentional in the current implementation. In the meantime, the team is exploring options for server-side embeddings.

When it comes to adding it works exactly the same, you create a collection by providing name, metadata and most importantly embedding function. Then the embedding function converts your texts to embedding vectors and sends them to the backend, this conversion of course happens on the client-side again.

HammadB commented 1 year ago

@joesamcoke Yeah, server side embeddings is something we want to support but right now client-side embeddings is the only supported path.

joesamcoke commented 1 year ago

@tazarov @HammadB my mistake, would be great to have though to keep that step out of the client.

tazarov commented 1 year ago

@joesamcoke, I understand your pain point, and I can almost guarantee you that it will be addressed in the very near future.