chroma icon indicating copy to clipboard operation
chroma copied to clipboard

[Feature Request]: REST API documentation

Open splitbrain opened this issue 1 year ago • 8 comments

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

splitbrain avatar Nov 02 '23 15:11 splitbrain

@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.

tazarov avatar Nov 02 '23 16:11 tazarov

Ah excellent! This already helps. Thank you

splitbrain avatar Nov 02 '23 17:11 splitbrain

@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.

tazarov avatar Nov 03 '23 18:11 tazarov

@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)

jeffchuber avatar Nov 03 '23 20:11 jeffchuber

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

tazarov avatar Nov 19 '23 12:11 tazarov

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

DominicWatson avatar May 07 '24 22:05 DominicWatson

@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.

tazarov avatar May 08 '24 15:05 tazarov