chroma-core/chroma

GitHub: chroma-core/chroma

Chroma 是一款开源的 AI 向量数据库,专注于简化大模型应用的语义检索和知识存储。

Stars: 27006 | Forks: 2154

![Chroma](https://raw.githubusercontent.com/chroma-core/chroma/main/docs/assets/chroma-wordmark-color.png#gh-light-mode-only) ![Chroma](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/507074a72f181832.png)

Chroma - AI 的开源数据基础设施.

Discord | License | Docs | Homepage

``` pip install chromadb # python client # 对于 javascript,npm install chromadb! # 对于 client-server 模式,chroma run --path /chroma_db_path ``` ## Chroma Cloud 我们的托管服务 Chroma Cloud 为无服务器向量、混合和全文搜索提供支持。它极其快速、具有成本效益、可扩展且轻松易用。只需 $5 的免费额度,即可在 30 秒内创建一个数据库并开始试用。 [开始使用 Chroma Cloud](https://trychroma.com/signup) ## API 核心 API 仅包含 4 个函数(运行我们的 [💡 Google Colab](https://colab.research.google.com/drive/1QEzFyqnoFxq7LUGyP1vzR4iLt9PpCDXv?usp=sharing)): ``` import chromadb # 设置 Chroma in-memory,便于轻松原型设计。也可以轻松添加持久化! client = chromadb.Client() # 创建 collection。也支持 get_collection、get_or_create_collection 和 delete_collection! collection = client.create_collection("all-my-documents") # 向 collection 中添加文档。也可以更新和删除。Row-based API 即将推出! 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 ) # 查询/搜索 2 个最相似的结果。你也可以通过 id 进行 .get 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 ) ``` 在我们的 [文档](https://docs.trychroma.com) 中了解所有功能 ## 许可证 [Apache 2.0](./LICENSE)
标签:AI基础设施, Apache 2.0, Apex, Chroma, ChromaDB, CMS安全, DLL 劫持, Embedding, JavaScript, LLM, NLP, Python, RAG, RAG框架, Ruby, TypeScript, Unmanaged PE, Vector Database, 人工智能, 全文本搜索, 向量数据库, 向量检索, 大语言模型, 安全插件, 嵌入式数据库, 开源, 数据可视化, 无后门, 机器学习, 检索增强生成, 混合搜索, 用户模式Hook绕过, 相似度搜索, 知识库, 语义搜索, 请求拦截, 逆向工具, 通知系统