chromadb
v1.4.1chromadb
Chroma is the open-source embedding database. Chroma makes it easy to build LLM apps by making knowledge, facts, and skills pluggable for LLMs.
This package gives you a JS/TS interface to talk to a backend Chroma DB over REST.
Getting started
Chroma needs to be running in order for this client to talk to it. Please see the ๐งช Usage Guide to learn how to quickly stand this up.
Small example
import { ChromaClient } from "chromadb";
const chroma = new ChromaClient({ path: "http://localhost:8000" });
const collection = await chroma.createCollection({ name: "test-from-js" });
for (let i = 0; i < 20; i++) {
await collection.add({
ids: ["test-id-" + i.toString()],
embeddings: [1, 2, 3, 4, 5],
documents: ["test"],
});
}
const queryData = await collection.query({
queryEmbeddings: [1, 2, 3, 4, 5],
queryTexts: ["test"],
});
Local development
License
Apache 2.0
npm i [email protected]
Metadata
- Apache-2.0
- Whatever
- Unknown
- released 4/19/2023