diff --git a/README.md b/README.md
index c888a32..991e8b7 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ For backends with official Semantic Kernel connectors, use those packages direct
|---|---|
| In-Memory | `Microsoft.SemanticKernel.Connectors.InMemory` |
| SQLite | `Microsoft.SemanticKernel.Connectors.Sqlite` |
-| Chroma | `Microsoft.SemanticKernel.Connectors.Chroma` |
+| Chroma | `CommunityToolkit.VectorData.Chroma` |
| Qdrant | `Microsoft.SemanticKernel.Connectors.Qdrant` |
| Pinecone | `Microsoft.SemanticKernel.Connectors.Pinecone` |
| Weaviate | `Microsoft.SemanticKernel.Connectors.Weaviate` |
diff --git a/docs/index.md b/docs/index.md
index 1cbb5b7..cc3ce1b 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -33,7 +33,7 @@ For backends with official Semantic Kernel connectors, use those packages direct
|---|---|
| In-Memory | `Microsoft.SemanticKernel.Connectors.InMemory` |
| SQLite | `Microsoft.SemanticKernel.Connectors.Sqlite` |
-| Chroma | `Microsoft.SemanticKernel.Connectors.Chroma` |
+| Chroma | `CommunityToolkit.VectorData.Chroma` |
| Qdrant | `Microsoft.SemanticKernel.Connectors.Qdrant` |
| Pinecone | `Microsoft.SemanticKernel.Connectors.Pinecone` |
| Weaviate | `Microsoft.SemanticKernel.Connectors.Weaviate` |
diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
index 2c8c9ce..2b96324 100644
--- a/src/Directory.Packages.props
+++ b/src/Directory.Packages.props
@@ -16,6 +16,7 @@
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/IntegrationTests/DatabaseTests.Configure.cs b/src/IntegrationTests/DatabaseTests.Configure.cs
index 7389966..25edd64 100644
--- a/src/IntegrationTests/DatabaseTests.Configure.cs
+++ b/src/IntegrationTests/DatabaseTests.Configure.cs
@@ -1,3 +1,5 @@
+using ChromaDB.Client;
+using CommunityToolkit.VectorData.Chroma;
using DotNet.Testcontainers.Builders;
using LangChain.Databases.OpenSearch;
using LangChain.Databases.Postgres;
@@ -73,6 +75,28 @@ internal static async Task StartEnvironmentForAsync(Sup
Port = port,
};
}
+ case SupportedDatabase.Chroma:
+ {
+ var container = new ContainerBuilder()
+ .WithImage("chromadb/chroma:1.5.9")
+ .WithPortBinding(8000, assignRandomHostPort: true)
+ .WithWaitStrategy(Wait.ForUnixContainer()
+ .UntilHttpRequestIsSucceeded(r => r
+ .ForPort(8000)
+ .ForPath("/api/v2/heartbeat")))
+ .Build();
+
+ await container.StartAsync(cancellationToken);
+
+ var port = container.GetMappedPublicPort(8000);
+
+ return new DatabaseTestEnvironment
+ {
+ VectorStore = new ChromaVectorStore(new ChromaClient($"http://localhost:{port}"), ownsClient: true),
+ Container = container,
+ Port = port,
+ };
+ }
default:
throw new ArgumentOutOfRangeException(nameof(database), database, null);
}
diff --git a/src/IntegrationTests/DatabaseTests.cs b/src/IntegrationTests/DatabaseTests.cs
index 144bd21..e32b4ba 100644
--- a/src/IntegrationTests/DatabaseTests.cs
+++ b/src/IntegrationTests/DatabaseTests.cs
@@ -8,6 +8,7 @@ public partial class DatabaseTests
[TestCase(SupportedDatabase.InMemory)]
[TestCase(SupportedDatabase.Postgres)]
[TestCase(SupportedDatabase.OpenSearch)]
+ [TestCase(SupportedDatabase.Chroma)]
public async Task CreateAndDeleteCollection_Ok(SupportedDatabase database)
{
await using var environment = await StartEnvironmentForAsync(database);
@@ -38,6 +39,7 @@ public async Task CreateAndDeleteCollection_Ok(SupportedDatabase database)
[TestCase(SupportedDatabase.InMemory)]
[TestCase(SupportedDatabase.Postgres)]
[TestCase(SupportedDatabase.OpenSearch)]
+ [TestCase(SupportedDatabase.Chroma)]
public async Task UpsertAndGet_Ok(SupportedDatabase database)
{
await using var environment = await StartEnvironmentForAsync(database);
@@ -72,6 +74,7 @@ public async Task UpsertAndGet_Ok(SupportedDatabase database)
[TestCase(SupportedDatabase.InMemory)]
[TestCase(SupportedDatabase.Postgres)]
[TestCase(SupportedDatabase.OpenSearch)]
+ [TestCase(SupportedDatabase.Chroma)]
public async Task BatchUpsertAndGet_Ok(SupportedDatabase database)
{
await using var environment = await StartEnvironmentForAsync(database);
@@ -98,6 +101,7 @@ public async Task BatchUpsertAndGet_Ok(SupportedDatabase database)
[TestCase(SupportedDatabase.InMemory)]
[TestCase(SupportedDatabase.Postgres)]
[TestCase(SupportedDatabase.OpenSearch)]
+ [TestCase(SupportedDatabase.Chroma)]
public async Task DeleteRecord_Ok(SupportedDatabase database)
{
await using var environment = await StartEnvironmentForAsync(database);
@@ -125,6 +129,7 @@ public async Task DeleteRecord_Ok(SupportedDatabase database)
[TestCase(SupportedDatabase.InMemory)]
[TestCase(SupportedDatabase.Postgres)]
[TestCase(SupportedDatabase.OpenSearch)]
+ [TestCase(SupportedDatabase.Chroma)]
public async Task BatchDelete_Ok(SupportedDatabase database)
{
await using var environment = await StartEnvironmentForAsync(database);
@@ -169,6 +174,7 @@ public async Task BatchDelete_Ok(SupportedDatabase database)
[TestCase(SupportedDatabase.InMemory)]
[TestCase(SupportedDatabase.Postgres)]
[TestCase(SupportedDatabase.OpenSearch)]
+ [TestCase(SupportedDatabase.Chroma)]
public async Task GetServiceMetadata_Ok(SupportedDatabase database)
{
await using var environment = await StartEnvironmentForAsync(database);
@@ -190,6 +196,7 @@ public async Task GetServiceMetadata_Ok(SupportedDatabase database)
[TestCase(SupportedDatabase.InMemory)]
[TestCase(SupportedDatabase.Postgres)]
[TestCase(SupportedDatabase.OpenSearch)]
+ [TestCase(SupportedDatabase.Chroma)]
public async Task SimilaritySearch_Ok(SupportedDatabase database)
{
await using var environment = await StartEnvironmentForAsync(database);
diff --git a/src/IntegrationTests/LangChain.Databases.IntegrationTests.csproj b/src/IntegrationTests/LangChain.Databases.IntegrationTests.csproj
index da07b93..1ea9971 100644
--- a/src/IntegrationTests/LangChain.Databases.IntegrationTests.csproj
+++ b/src/IntegrationTests/LangChain.Databases.IntegrationTests.csproj
@@ -16,6 +16,7 @@
+
diff --git a/src/IntegrationTests/SupportedDatabase.cs b/src/IntegrationTests/SupportedDatabase.cs
index 7fd33f2..187ef57 100644
--- a/src/IntegrationTests/SupportedDatabase.cs
+++ b/src/IntegrationTests/SupportedDatabase.cs
@@ -8,4 +8,5 @@ public enum SupportedDatabase
Postgres,
Redis,
Mongo,
+ Chroma,
}