Repository navigation
Conversation
Chroma is an open-source search and retrieval database. This plugin follows the same shape as BotSharp.Plugin.Qdrant: an IVectorDb on top of ChromaDotNet.Client, with the URL, API key, tenant and database configured via ChromaSetting, for a local Chroma server and for Chroma Cloud.
PR Summary by QodoAdd Chroma vector database plugin
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
There was a problem hiding this comment.
🟡 Changes recommended
Filter correctness, concurrent payload replacement, and HTTP client registration remain unresolved.
4 open findings
What changed in this PR
Adds Chroma as an IVectorDb provider for local and cloud deployments.
Changes:
- Implements collection operations, cosine search, payload mapping, filtering, and paging.
- Adds plugin registration and connection settings.
- Integrates the plugin into WebStarter, the solution, and central package management.
| File | Description |
|---|---|
| src/WebStarter/WebStarter.csproj | References the Chroma plugin. |
| src/WebStarter/appsettings.json | Adds Chroma settings and plugin entry. |
| src/Plugins/BotSharp.Plugin.Chroma/Using.cs | Defines shared imports. |
| src/Plugins/BotSharp.Plugin.Chroma/ChromaSetting.cs | Defines connection settings. |
| src/Plugins/BotSharp.Plugin.Chroma/ChromaPlugin.cs | Registers settings and provider. |
| src/Plugins/BotSharp.Plugin.Chroma/ChromaDb.cs | Implements the vector database adapter. |
| src/Plugins/BotSharp.Plugin.Chroma/BotSharp.Plugin.Chroma.csproj | Defines the plugin project and dependencies. |
| Directory.Packages.props | Pins ChromaDotNet.Client. |
| BotSharp.sln | Adds project and build configurations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ect what Chroma cannot filter The plugin registers IHttpClientFactory, which ChromaDb takes its HttpClient from. A filter on text matches the document exactly, with an anchored regular expression. A range on values other than numbers, an empty text, and text in an OR with another field throw a NotSupportedException instead of leaving the filter out.


Adds a vector database plugin for Chroma, following the same structure as the existing Qdrant plugin:
ChromaDbimplementsIVectorDbon top of ChromaDotNet.Client, with the URL, API key, tenant and database configured throughChromaSettingand aChromasample block inappsettings.json. It works with a local Chroma server and with Chroma Cloud, where the API key gives the tenant and the database. Also wired intoBotSharp.sln,WebStarterandDirectory.Packages.props.Confidencekeeps its meaning.textpayload; the other payload values are its metadata, with the same type conversions as the Qdrant plugin. A match ontextis an exact match on the document, with an anchored regular expression.NextIdis the offset of the next page.CreateCollectionPayloadIndexreturns true for a collection that exists, andDeleteCollectionPayloadIndexreturns false. Chroma has no snapshots: the snapshot methods return nothing, null or false.OrderByof the paged data. Range filters on datetime values, which are stored as text, and a match ontextjoined byorto another field throw aNotSupportedException, instead of returning records outside the filter.Checked every
IVectorDbmethod against Chroma 1.5.9 in Docker and against Chroma Cloud: create, exists, list, details, upsert, search with match, range,andandorfilters, confidence and fields, paging, get by id, delete and delete all.dotnet build ./BotSharp.sln -c Releaseand the two test projects of the build workflow pass.ChromaDotNet.Client is also used by the AI Community Toolkit (
CommunityToolkit.VectorData.Chroma) and by the Chroma integrations of the Aspire Community Toolkit. Through CommunityToolkit.VectorData.Chroma, it is also used by the Microsoft course Generative AI for Beginners .NET, by LangChain .NET (a sample) and by LangChain.Databases (its integration tests). Semantic Kernel recommends CommunityToolkit.VectorData.Chroma for Chroma in .NET, and Microsoft Agent Framework lists it among its .NET community projects.Disclosure: I maintain ChromaDotNet.Client.