Spaces:
Sleeping
Sleeping
File size: 1,347 Bytes
287a0bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
## chromadb
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.
[Learn more about Chroma](https://github.com/chroma-core/chroma)
- [π¬ Community Discord](https://discord.gg/MMeYNTmh3x)
- [π Documentation](https://docs.trychroma.com/)
- [π‘ Colab Example](https://colab.research.google.com/drive/1QEzFyqnoFxq7LUGyP1vzR4iLt9PpCDXv?usp=sharing)
- [π Homepage](https://www.trychroma.com/)
## Getting started
Chroma needs to be running in order for this client to talk to it. Please see the [π§ͺ Usage Guide](https://docs.trychroma.com/usage-guide) to learn how to quickly stand this up.
## Small example
```js
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
[View the Development Readme](./DEVELOP.md)
## License
Apache 2.0
|