Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

This functionality was merged into the chroma-core JS library - just use that.

License

Notifications You must be signed in to change notification settings

Mintplex-Labs/chromadb-extended

Repository files navigation

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

About

This functionality was merged into the chroma-core JS library - just use that.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published