chroma README

The project's README from github.com/chroma-core/chroma. As one markdown file: README.md.

Chroma Chroma

Chroma - the open-source data infrastructure for AI.

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, hybrid, 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

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

chroma (chroma-core/chroma)

Searching Database…

29.5K ·GitHub
这是什么?Chroma 是面向 AI 的开源数据基础设施:一个向量数据库,为嵌入向量的搜索提供支持,可用于检索增强生成(RAG)和 AI 智能体记忆等场景。
这是数据库还是客户端库?它是一个数据库引擎(用 Rust 编写),你可以自己运行,也可以使用托管服务;通过经由 pypi 和 npm 分发的客户端包来访问。
我该如何开始使用 Chroma?最简单的方式是使用 Chroma Cloud:利用 5 美元免费额度,30 秒内即可创建数据库并开始试用。也支持通过 pypi/npm 包和 Docker 进行自行部署。
使用 Chroma 的客户端需要什么?你需要 Python(pypi)或 JavaScript/TypeScript(npm)客户端包来连接 Chroma 实例;如果选择托管方案,则需要一个 Chroma Cloud 账户。
核心 API 难学吗?不难。核心 API 刻意保持精简,只提供 4 个函数,因此即便它是一个完整的数据库,学习曲线依然很低。
Chroma 支持哪些类型的搜索?Chroma Cloud 提供无服务器的向量搜索、混合搜索和全文搜索,你可以把基于语义(嵌入向量)的搜索与传统的关键词搜索结合起来使用。
Chroma Cloud 到底是什么?它是 Chroma 的托管服务,即数据库的全托管、无服务器版本,速度快、性价比高、可扩展,你无需自己运行基础设施。
Chroma 多久发布一次更新?团队每周一发布 pypi 和 npm 包的新标记版本;如有需要,也会在一周内随时发布热修复版本。
我为什么要用 Chroma,而不是通用数据库?Chroma 专为嵌入向量和 RAG 等 AI 搜索场景而打造,开箱即用地提供向量搜索、混合搜索和全文搜索,并且只有 4 个函数的精简 API。
What are similar projects?txtai, weaviate, m_flow, memvid, orama, xerj, localGPT, PageIndex
Size
856 MB
Stars
29.5K
Age
4y
Commits · 90 Days