
ChromaDB
The AI-native embedding database
Chroma
chroma-core/chroma:0.6.3
Just deployed
/chroma/chroma
The AI-native embedding database
Current Version: 0.6.3
Quickstart
Do you hate reading? This is for you! Here's a super quick rundown of how to use this template.
Assuming we have this template deployed and we have another NodeJS service next to it that we want to use to connect to ChromaDB. You can easily connect by doing the following:
Setting Service Variables
In your service, create the following service variables:
CHROMA_TOKEN="${{Chroma.CHROMA_SERVER_AUTHN_CREDENTIALS}}"
CHROMA_URL="${{Chroma.CHROMA_PUBLIC_URL}}"
> Note: This assumes that the chroma service's name wasn't changed.
Creating Client
In your application, add the following code:
import { ChromaClient } from "chromadb";
const chroma = new ChromaClient({
path: process.env.CHROMA_URL,
auth: {
provider: "token",
credentials: process.env.CHROMA_TOKEN,
tokenHeaderType: "AUTHORIZATION"
}
});
> Note: This assumes that you have all necessary dependencies installed, like chromadb
.
And now you're ready to use Chroma! Of course this is just a quick example and your actual setup may vary. This quickstart did not cover how to connect over the private network, please see below.
Connecting to ChromaDB
This template is exposed publicly by default. Meaning to connect to it you can use the CHROMA_PUBLIC_URL
service variable.
However, it's recommended you use the Private Network in production. To use this template with the private network, set CHROMA_HOST_ADDR
to ::
on the Chroma service then connect through the CHROMA_PRIVATE_URL
service variable.
Authentication
This Chroma DB template uses token authentication by default as specified in the CHROMA_SERVER_AUTHN_PROVIDER
service variable. A secure token is automatically created in the CHROMA_SERVER_AUTHN_CREDENTIALS
service variable.
You can change the authentication to basic or any other authentication, to do that please refer to ChromaDB's documentation (see below).
Documentation
All the documentation is covered here!
Template Content