Repository navigation
ChromaDotNet.VectorData 0.4.0 - #4
Merged
Merged
Conversation
…rs 0.1.6 ChromaVectorStore takes ownsClient: each sample gives the vector store the ChromaClient it creates for it, and the tests share the client of the fixture.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Undisposed collections and providers prevent the newly owned clients from being released, while the fixture no longer disposes its client.
Review effort: Balanced
Findings: 7
Open (7)
Dispose ChatHistoryMemoryProvider before VectorStore · New Dispose ChatHistoryMemoryProvider before VectorStore · New Dispose documentationCollection before VectorStore · New Dispose documentationCollection before VectorStore · New Dispose TextSearchStore before VectorStore · New Dispose TextSearchStore before VectorStore · New Dispose ChromaClient before its transport · New
What changed in this PR
Updates Chroma dependencies and adopts explicit ChromaClient ownership.
Changes:
- Upgrades VectorData to 0.4.0 and Testcontainers to 0.1.6.
- Configures client ownership for samples and tests.
| File | Description |
|---|---|
test/.../ChromaFixture.cs |
Marks the shared client as externally owned. |
test/.../ChromaDB.AgentFramework.Sample.Tests.csproj |
Updates test dependencies. |
test/.../BasicTextRagTests.cs |
Uses the fixture-owned client. |
samples/AgentWithRAG_Step06_ChromaRAG/Program.cs |
Assigns client ownership to the store. |
samples/AgentWithRAG_Step06_ChromaRAG/AgentWithRAG_Step06_ChromaRAG.csproj |
Updates VectorData. |
samples/AgentWithRAG_Step06_ChromaRAG_Ollama/Program.cs |
Assigns client ownership to the store. |
samples/AgentWithRAG_Step06_ChromaRAG_Ollama/AgentWithRAG_Step06_ChromaRAG_Ollama.csproj |
Updates VectorData. |
samples/AgentWithRAG_Step07_ChromaBasicTextRAG/Program.cs |
Assigns client ownership to the store. |
samples/AgentWithRAG_Step07_ChromaBasicTextRAG/AgentWithRAG_Step07_ChromaBasicTextRAG.csproj |
Updates VectorData. |
samples/AgentWithRAG_Step07_ChromaBasicTextRAG_Ollama/Program.cs |
Assigns client ownership to the store. |
samples/AgentWithRAG_Step07_ChromaBasicTextRAG_Ollama/AgentWithRAG_Step07_ChromaBasicTextRAG_Ollama.csproj |
Updates VectorData. |
samples/AgentWithMemory_Step10_MemoryUsingChroma/Program.cs |
Assigns client ownership to the store. |
samples/AgentWithMemory_Step10_MemoryUsingChroma/AgentWithMemory_Step10_MemoryUsingChroma.csproj |
Updates VectorData. |
samples/AgentWithMemory_Step10_MemoryUsingChroma_Ollama/Program.cs |
Assigns client ownership to the store. |
samples/AgentWithMemory_Step10_MemoryUsingChroma_Ollama/AgentWithMemory_Step10_MemoryUsingChroma_Ollama.csproj |
Updates VectorData. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| using HttpClient httpClient = new(); | ||
| using ChromaVectorStore vectorStore = new( | ||
| new ChromaClient(new ChromaConfigurationOptions(chromaEndpoint), httpClient), | ||
| ownsClient: true, |
| using HttpClient httpClient = new(); | ||
| using ChromaVectorStore vectorStore = new( | ||
| new ChromaClient(new ChromaConfigurationOptions(chromaEndpoint), httpClient), | ||
| ownsClient: true, |
| using HttpClient httpClient = new(); | ||
| using ChromaVectorStore vectorStore = new( | ||
| new ChromaClient(new ChromaConfigurationOptions(chromaEndpoint), httpClient), | ||
| ownsClient: true, |
| using HttpClient httpClient = new(); | ||
| using ChromaVectorStore vectorStore = new( | ||
| new ChromaClient(new ChromaConfigurationOptions(chromaEndpoint), httpClient), | ||
| ownsClient: true, |
| using HttpClient httpClient = new(); | ||
| using ChromaVectorStore vectorStore = new( | ||
| new ChromaClient(new ChromaConfigurationOptions(chromaEndpoint), httpClient), | ||
| ownsClient: true, |
| using HttpClient httpClient = new(); | ||
| using ChromaVectorStore vectorStore = new( | ||
| new ChromaClient(new ChromaConfigurationOptions(chromaEndpoint), httpClient), | ||
| ownsClient: true, |
| await _container.StartAsync(); | ||
| ChromaClient = new ChromaClient(new ChromaConfigurationOptions(_container.GetConnectionString()), _httpClient); | ||
| VectorStore = new ChromaVectorStore(ChromaClient, new ChromaVectorStoreOptions { EmbeddingGenerator = new WordEmbeddingGenerator(EmbeddingDimensions) }); | ||
| VectorStore = new ChromaVectorStore(ChromaClient, ownsClient: false, new ChromaVectorStoreOptions { EmbeddingGenerator = new WordEmbeddingGenerator(EmbeddingDimensions) }); |
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.

ChromaVectorStoretakesownsClient: each sample gives the vector store theChromaClientit creates for it (ownsClient: true), and the tests share the client of the fixture (ownsClient: false).