Repository navigation
[04-chromadb] Connect to Chroma 1.x with ChromaDotNet.Client - #72
Merged
El Bruno (elbruno) merged 1 commit intoOct 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused migration is internally consistent and has no identified blocking issues; runtime validation was not independently performed.
No open issues 🎉
What changed in this PR
Restores scenario 04’s Chroma connectivity by migrating Products to a Chroma 1.x-compatible client, addressing #71.
Changes:
- Replaces the legacy client and removes the
/api/v1suffix. - Updates collection operations and omits unused metadata.
- Pins Chroma to
1.5.9and aligns README examples.
| File | Description |
|---|---|
| scenarios/04-chromadb/src/Products/Program.cs | Updates client and collection initialization. |
| scenarios/04-chromadb/src/Products/Products.csproj | Uses ChromaDotNet.Client 2.14.0. |
| scenarios/04-chromadb/src/Products/Memory/MemoryContext.cs | Updates upsert and query calls. |
| scenarios/04-chromadb/src/eShopAppHost/Program.cs | Pins the Chroma container version. |
| scenarios/04-chromadb/README.md | Aligns setup and API examples. |
Review effort: Balanced
This was referenced Oct 19, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Scenario 04-chromadb cannot reach Chroma:
GetOrCreateCollectionfails withNotFound, so the semantic search has no collection.Productsmoves fromChromaDB.Client1.0.1-ci-13369893450 to ChromaDotNet.Client 2.14.0, which uses the v2 API of Chroma 1.x.ChromaDB.Clientis deprecated on NuGet in favor of ChromaDotNet.Client. The namespace is stillChromaDB.Client.Program.cs: the client takes the Chroma address as it is, withnew ChromaClient(uri). No more/api/v1.MemoryContext.cs:UpsertAsyncandQueryAsync, the method names in 2.x. The empty metadata list is no longer passed: it was never filled, and 2.x wants one entry per id or none.chromadb/chroma:1.5.9, the version tested. The untagged image moved from 0.x to 1.x and broke the sample; with a tag, a new major does not break it again.Where the packages are used:
Fixes #71
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Then run
eShopAppHostas in the scenario README and search from the Store.What to Check
Verify that the following are valid
Other Information
Tested with
chromadb/chroma:1.5.9and SQL Server 2025 in Docker, .NET SDK 10.0.402:NotFound. After: theproductscollection is created and the log shows "Memory context initialized: True".MemoryContextwith deterministic fake embeddings and a fake chat client: 9 products upserted, 9 records in the collection, and the searches return products. The results are the same as with the old client and/api/v1/against Chroma 0.5.20.eShopAppHostwith the containers it starts (Chroma 1.5.9, SQL Server 2022) and Azure OpenAI, keyless, withgpt-5.4-minifor chat andtext-embedding-3-smallfor embeddings. Before: the semantic search in the Store shows "No response" and/api/aisearchreturns 500. After: 9 records in theproductscollection, and from the Store "rain jacket" returns Outdoor Rain Jacket and Outdoor Backpack, "something for camping" returns Camping Lantern and Camping Tent.dotnet format --verify-no-changeson the changed files passes.