Skip to main content

Chroma.

Project description

Chroma logo

Chroma - the open-source embedding database.
The fastest way to build Python or JavaScript LLM apps with memory!

Discord | License | Docs | Homepage

pip install chromadb # python client
# for javascript, npm install chromadb!
# for client-server mode, chroma run --path /chroma_db_path

Chroma Cloud

Our hosted service, Chroma Cloud, powers serverless vector and full-text search. It's extremely fast, cost-effective, scalable and painless. Create a DB and try it out in under 30 seconds with $5 of free credits.

Get started with Chroma Cloud

API

The core API is only 4 functions (run our 💡 Google Colab):

import chromadb
# setup Chroma in-memory, for easy prototyping. Can add persistence easily!
client = chromadb.Client()

# Create collection. get_collection, get_or_create_collection, delete_collection also available!
collection = client.create_collection("all-my-documents")

# Add docs to the collection. Can also update and delete. Row-based API coming soon!
collection.add(
    documents=["This is document1", "This is document2"], # we handle tokenization, embedding, and indexing automatically. You can skip that and add your own embeddings as well
    metadatas=[{"source": "notion"}, {"source": "google-docs"}], # filter on these!
    ids=["doc1", "doc2"], # unique for each doc
)

# Query/search 2 most similar results. You can also .get by id
results = collection.query(
    query_texts=["This is a query document"],
    n_results=2,
    # where={"metadata_field": "is_equal_to_this"}, # optional filter
    # where_document={"$contains":"search_string"}  # optional filter
)

Learn about all features on our Docs

Features

  • Simple: Fully-typed, fully-tested, fully-documented == happiness
  • Integrations: 🦜️🔗 LangChain (python and js), 🦙 LlamaIndex and more soon
  • Dev, Test, Prod: the same API that runs in your python notebook, scales to your cluster
  • Feature-rich: Queries, filtering, regex and more
  • Free & Open Source: Apache 2.0 Licensed

Use case: ChatGPT for ______

For example, the "Chat your data" use case:

  1. Add documents to your database. You can pass in your own embeddings, embedding function, or let Chroma embed them for you.
  2. Query relevant documents with natural language.
  3. Compose documents into the context window of an LLM like GPT4 for additional summarization or analysis.

Embeddings?

What are embeddings?

  • Read the guide from OpenAI
  • Literal: Embedding something turns it from image/text/audio into a list of numbers. 🖼️ or 📄 => [1.2, 2.1, ....]. This process makes documents "understandable" to a machine learning model.
  • By analogy: An embedding represents the essence of a document. This enables documents and queries with the same essence to be "near" each other and therefore easy to find.
  • Technical: An embedding is the latent-space position of a document at a layer of a deep neural network. For models trained specifically to embed data, this is the last layer.
  • A small example: If you search your photos for "famous bridge in San Francisco". By embedding this query and comparing it to the embeddings of your photos and their metadata - it should return photos of the Golden Gate Bridge.

Embeddings databases (also known as vector databases) store embeddings and allow you to search by nearest neighbors rather than by substrings like a traditional database. By default, Chroma uses Sentence Transformers to embed for you but you can also use OpenAI embeddings, Cohere (multilingual) embeddings, or your own.

Get involved

Chroma is a rapidly developing project. We welcome PR contributors and ideas for how to improve the project.

Release Cadence We currently release new tagged versions of the pypi and npm packages on Mondays. Hotfixes go out at any time during the week.

License

Apache 2.0

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chromadb-1.0.21.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

chromadb-1.0.21-cp39-abi3-win_amd64.whl (19.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

chromadb-1.0.21-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (19.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

chromadb-1.0.21-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (18.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

chromadb-1.0.21-cp39-abi3-macosx_11_0_arm64.whl (18.3 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

chromadb-1.0.21-cp39-abi3-macosx_10_12_x86_64.whl (19.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file chromadb-1.0.21.tar.gz.

File metadata

  • Download URL: chromadb-1.0.21.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for chromadb-1.0.21.tar.gz
Algorithm Hash digest
SHA256 583f12f8005f5d197e3207c3b845bce79b8ea6b57781aea505e12b08d26fd508
MD5 4962b40513287314f946bef800a37e93
BLAKE2b-256 65d798fdccb25ae3642213ebd29ca2060387cc6abd1f3f0e96b24a36796aa4ba

See more details on using hashes here.

File details

Details for the file chromadb-1.0.21-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: chromadb-1.0.21-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 19.8 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for chromadb-1.0.21-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3e44fcea9b5ce4e653cd32b0673fe5ecb99f9f737c0cf97414b1d096794a19f9
MD5 e053947546d510b3bd687f992f687972
BLAKE2b-256 866f2ea981d3cfae2b0388ec1e311bdfecf3cdc1d45f803305fb1d7ad0d0d9a0

See more details on using hashes here.

File details

Details for the file chromadb-1.0.21-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chromadb-1.0.21-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6b1420248865b5d3b6d0aac50e2d014c0b849959b6952ddd140cac13bb84c9f
MD5 4cecbfe70c199a5423962cbc53436771
BLAKE2b-256 4a573630d9d90d2b6988be01565386dce0c3a7e4d4eed2d276f849a0be792369

See more details on using hashes here.

File details

Details for the file chromadb-1.0.21-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chromadb-1.0.21-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7817cddbd52296c3c71031e330c2dbcd5c5b4f4430895c19ccea1dfa814f9787
MD5 b71cb1152ef36e99c9ef8d40f082945c
BLAKE2b-256 5893a95266dd4d81f1015bf5259c647bcf1a7430b3fba58d4f8b6a5a11d3e399

See more details on using hashes here.

File details

Details for the file chromadb-1.0.21-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chromadb-1.0.21-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1a328a76ba1b1b199473db108ec7a22e048888d8d695f39aa503210082e80af
MD5 0c5f882ef066a56eff8f347794f75edb
BLAKE2b-256 8ddcb01512adc298874613728176782772692f78b16fdb8cb59ae7d9bedbedbf

See more details on using hashes here.

File details

Details for the file chromadb-1.0.21-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chromadb-1.0.21-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 de6df7ba7a08cc8e76caa1509fd7b4317fc34f5842b4077e35985bf9625c9bab
MD5 aa21f1cca0497445c871c8a9a5387073
BLAKE2b-256 3d87554ec13e21150a548071dbaa9f13867946b56a8603ae045e79c7abf38034

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page