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

This version

1.3.4

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.3.4.tar.gz (1.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

chromadb-1.3.4-cp39-abi3-win_amd64.whl (20.8 MB view details)

Uploaded CPython 3.9+Windows x86-64

chromadb-1.3.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.8 MB view details)

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

chromadb-1.3.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (19.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

chromadb-1.3.4-cp39-abi3-macosx_11_0_arm64.whl (19.2 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

chromadb-1.3.4-cp39-abi3-macosx_10_12_x86_64.whl (20.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for chromadb-1.3.4.tar.gz
Algorithm Hash digest
SHA256 47c64a735e610d1b3f50749959508ed51dc4bd7ff9611472ffddb5da8540f40d
MD5 4bb019eac0cac399773013d082b49bec
BLAKE2b-256 796250e3385e703d9db4ccb8abe7a6cfe6f6f1529eefa168ac417dd394e7231e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for chromadb-1.3.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8da98a377ca06bdc8dc8bd77b4e2aeb703858a615a3fe5bbb247396acfc90168
MD5 148d134ff2c071c1bdcd3d6b35b24a8f
BLAKE2b-256 a32193ae1b1bdca02bf303505d117f4f8cfb9fc78c1935b551da6eb5859f5b26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromadb-1.3.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2f5d0be5d2d5d1f457608156f2676d244af8d788edcffce1b2b25bac19e3b66
MD5 0cd1b491a040decc45c1a92f3ae0b798
BLAKE2b-256 3dcf2d490b3a46f4c67be48506bb69a9670949df7fee17e211a75ad36484a7c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromadb-1.3.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e2e939ef7505a380abce0cc52468990fe1956752283ae57ed7f42119202901d7
MD5 aceace91cb575aa7cc73aaf3fb84181c
BLAKE2b-256 619b1e3e8d80a6e59f5d844a0848e963c6478dd1bf3c3ab7f1599b55ec85633c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromadb-1.3.4-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ca859c48f43149c17aeb2c6dd05d5238597498594fabde5c33f438992136ef5
MD5 3a774ed532f1d2092d2875d791056415
BLAKE2b-256 e79249b8d99d03d9840267dd53f6810e52910859c5fb7dc8d7f13f6a776bdebf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromadb-1.3.4-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c642085aa064851054fdc5ea232ed1bab75dfadc4cf0686504ef3e61b21ad670
MD5 774e83e9ee5f034b0d511e3ddb858e3d
BLAKE2b-256 f6cc0428af3684d7ea990cc57c0cc8a9b7ad6795f2390f5f646c23a087e9f697

See more details on using hashes here.

Supported by

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