1.0.2 • Published 2 years ago

@mintplex-labs/chromadb-extended v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

chromadb-extended by Mintplex Labs

This is an extension on the original chromadb npm package to enable the ability to use private single-instance Chroma instances to utilize authentication during their requests.

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 { ChromaClientExtended } from "chromadb-extended";
const chroma = new ChromaClient({
  path: "http://localhost:8000",
  fetchOptions: {
    headers: {
      'X-Api-Token': "sk-live-Hunt3r2", // Works like regular node-fetch headers!
    }
  }
});

// Now use as you normally would use chromadb

await client.reset()
await client.heartbeat()
await client.getOrCreateCollection({ name: "test" });
await client.listCollections()
const collection = await client.getCollection({ name: 'test' })
await collection.count()
await collection.add({ ids, embeddings, metadatas })
// etc etc

License

Apache 2.0

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago