chromadb 3.0.0 โ 3.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/chromadb.d.ts +584 -21
- package/dist/chromadb.legacy-esm.js +416 -51
- package/dist/chromadb.mjs +416 -51
- package/dist/chromadb.mjs.map +1 -1
- package/dist/cjs/chromadb.cjs +438 -52
- package/dist/cjs/chromadb.cjs.map +1 -1
- package/dist/cjs/chromadb.d.cts +584 -21
- package/dist/cjs/cli.cjs +0 -0
- package/package.json +21 -21
- package/src/admin-client.ts +58 -0
- package/src/api/types.gen.ts +815 -772
- package/src/chroma-client.ts +119 -22
- package/src/chroma-fetch.ts +8 -1
- package/src/cloud-client.ts +26 -1
- package/src/collection-configuration.ts +140 -0
- package/src/collection.ts +180 -33
- package/src/deno.ts +32 -0
- package/src/embedding-function.ts +105 -32
- package/src/index.ts +12 -0
- package/src/next.ts +26 -0
- package/src/types.ts +83 -0
- package/src/utils.ts +66 -5
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
## chromadb
|
|
2
|
+
|
|
3
|
+
Chroma is the open-source embedding database. Chroma makes it easy to build LLM apps by making knowledge, facts, and skills pluggable for LLMs.
|
|
4
|
+
|
|
5
|
+
This package gives you a JS/TS interface to talk to a backend Chroma DB over REST.
|
|
6
|
+
|
|
7
|
+
[Learn more about Chroma](https://github.com/chroma-core/chroma)
|
|
8
|
+
|
|
9
|
+
- [๐ฌ Community Discord](https://discord.gg/MMeYNTmh3x)
|
|
10
|
+
- [๐ Documentation](https://docs.trychroma.com/)
|
|
11
|
+
- [๐ก Colab Example](https://colab.research.google.com/drive/1QEzFyqnoFxq7LUGyP1vzR4iLt9PpCDXv?usp=sharing)
|
|
12
|
+
- [๐ Homepage](https://www.trychroma.com/)
|
|
13
|
+
|
|
14
|
+
## Getting started
|
|
15
|
+
|
|
16
|
+
Chroma needs to be running in order for this client to talk to it. Please see the [๐งช Usage Guide](https://docs.trychroma.com/guides) to learn how to quickly stand this up.
|
|
17
|
+
|
|
18
|
+
## Small example
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import { ChromaClient } from "chromadb";
|
|
22
|
+
const chroma = new ChromaClient({ path: "http://localhost:8000" });
|
|
23
|
+
const collection = await chroma.createCollection({ name: "test-from-js" });
|
|
24
|
+
for (let i = 0; i < 20; i++) {
|
|
25
|
+
await collection.add({
|
|
26
|
+
ids: ["test-id-" + i.toString()],
|
|
27
|
+
embeddings: [[1, 2, 3, 4, 5]],
|
|
28
|
+
documents: ["test"],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const queryData = await collection.query({
|
|
32
|
+
queryEmbeddings: [[1, 2, 3, 4, 5]],
|
|
33
|
+
queryTexts: ["test"],
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Local development
|
|
38
|
+
|
|
39
|
+
[View the Development Readme](./DEVELOP.md)
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
Apache 2.0
|