chroma-core / chroma

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

[Feature Request]: REST API documentation #1322

Open splitbrain opened 8 months ago

splitbrain commented 8 months ago

Describe the problem

From what I understand, Chroma can run in client/server mode, where the client talks via a HTTP REST API to the server.

This should make it relatively easy to use Chroma from other languages than python or javascript. Howver, I can't find any documentation of said REST API.

Describe the proposed solution

Add REST (maybe with curl examples) as a third client option on the website.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

tazarov commented 8 months ago

@splitbrain, if you run Chroma in client/server mode, you can go to http://localhost:8000/docs to see the OpenAPI spec. Related to finding the information, I'll take note of this and update the docs to reflect how users can get to the API docs via the URL I mentioned.

splitbrain commented 8 months ago

Ah excellent! This already helps. Thank you

tazarov commented 8 months ago

@splitbrain, I have added a small note in the docs to the above https://docs-git-fork-amikos-tech-feature-rest-api-ref-chromacore.vercel.app/api-reference.

jeffchuber commented 8 months ago

@tazarov fwiw i think we should land https://github.com/chroma-core/docs/pull/152 and then do this the "right way" (which is to have a dedicated page for it)

tazarov commented 7 months ago

@jeffchuber, we could use this to generate browseable API docs - https://github.com/PaloAltoNetworks/docusaurus-openapi-docs .

DominicWatson commented 2 months ago

if you run Chroma in client/server mode, you can go to http://localhost:8000/docs to see the OpenAPI spec.

This spec seems very incomplete. i.e. beyond listing what the endpoints are - I see no detailed schemas to indicate what body they expect. I see specs for what URL parameters an endpoint requires (e.g. tenant), but no detail around what the /collections/{collection_id}/add endpoint expects as a body, for example.

image

Is there ticket open to complete this documentation?

^^ repeatable by:

pip install chromadb
chroma run
tazarov commented 2 months ago

@DominicWatson, you have a point about the auto-generated docs. Thanks for bringing this to our attention. This does need to be addressed. As far as PRs go there are several that deal with various such aspects.