From 0971c8a66d2b7d8613082e9a63ee3eece37a9eae Mon Sep 17 00:00:00 2001 From: Laurianti Date: Thu, 8 Oct 2026 09:47:18 +0200 Subject: [PATCH 1/2] Start Chroma for the conformance tests with ChromaDotNet.Testcontainers 0.1.7 --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 5f7bf38..d3ba0c6 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -24,7 +24,7 @@ - + From e2f2c0acf6a55a923bc2624cdc16bf73c4031e53 Mon Sep 17 00:00:00 2001 From: Laurianti Date: Thu, 8 Oct 2026 09:47:31 +0200 Subject: [PATCH 2/2] Support auto-generation of keys only for GUIDs, as CommunityToolkit/AI#58 does --- src/ChromaDB.VectorData/ChromaModelBuilder.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ChromaDB.VectorData/ChromaModelBuilder.cs b/src/ChromaDB.VectorData/ChromaModelBuilder.cs index c74a5e3..1d8948a 100644 --- a/src/ChromaDB.VectorData/ChromaModelBuilder.cs +++ b/src/ChromaDB.VectorData/ChromaModelBuilder.cs @@ -30,6 +30,13 @@ protected override void ValidateKeyProperty(KeyPropertyModel keyProperty) throw new NotSupportedException( $"Property '{keyProperty.ModelName}' has unsupported type '{type.Name}'. Key properties must be either string or Guid."); } + + // String and Guid keys are supported by the Chroma provider, but we support auto-generation of keys only for GUIDs + if (keyProperty.IsAutoGenerated && keyProperty.Type != typeof(Guid)) + { + throw new NotSupportedException( + $"Auto-generation is only supported for key properties of type Guid. Property '{keyProperty.ModelName}' has type '{keyProperty.Type.Name}'."); + } } // Checked when the collection object is constructed, rather than when it is first used.