From ff94d346d3423cefc4e96417e7854843247e8584 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 17:26:34 +0000 Subject: [PATCH 01/12] Migrate SK connector packages to CommunityToolkit.VectorData in samples --- dotnet/Directory.Packages.props | 20 +++++++++---------- ...tCompletion_ContextualFunctionSelection.cs | 2 +- .../Concepts/Agents/ChatCompletion_Rag.cs | 2 +- .../Caching/SemanticCachingWithFilters.cs | 2 +- dotnet/samples/Concepts/Concepts.csproj | 15 +++++++------- ...gingFace_TextEmbeddingCustomHttpHandler.cs | 4 ++-- .../PineconeFactory.cs | 2 +- .../RedisFactory.cs | 2 +- ...re_ConsumeFromMemoryStore_AzureAISearch.cs | 2 +- ...ctorStore_ConsumeFromMemoryStore_Qdrant.cs | 2 +- ...ectorStore_ConsumeFromMemoryStore_Redis.cs | 2 +- .../VectorStore_DataIngestion_MultiStore.cs | 6 +++--- .../VectorStore_DataIngestion_Simple.cs | 2 +- .../VectorStore_DynamicDataModel_Interop.cs | 2 +- ...Store_HybridSearch_Simple_AzureAISearch.cs | 2 +- ...e_VectorSearch_MultiStore_AzureAISearch.cs | 2 +- ...rStore_VectorSearch_MultiStore_InMemory.cs | 2 +- ...rStore_VectorSearch_MultiStore_Postgres.cs | 2 +- ...torStore_VectorSearch_MultiStore_Qdrant.cs | 2 +- ...ctorStore_VectorSearch_MultiStore_Redis.cs | 2 +- .../VectorStore_VectorSearch_MultiVector.cs | 2 +- .../Memory/VectorStore_VectorSearch_Paging.cs | 2 +- .../Memory/VectorStore_VectorSearch_Simple.cs | 2 +- .../Memory/VolatileVectorStore_LoadData.cs | 2 +- .../Optimization/FrugalGPTWithFilters.cs | 2 +- dotnet/samples/Concepts/RAG/WithPlugins.cs | 2 +- .../Concepts/Search/VectorStore_TextSearch.cs | 2 +- .../VectorStoreRAG/VectorStoreRAG.csproj | 15 +++++++------- 28 files changed, 54 insertions(+), 52 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index a76de3779d69..7e901fa27b50 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -174,7 +174,7 @@ - + @@ -202,15 +202,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs b/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs index 94d800985fc1..3962f69b1508 100644 --- a/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs +++ b/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.AI; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Agents; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Functions; namespace Agents; diff --git a/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs b/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs index 8d7cf969e319..a1f4261ebc4b 100644 --- a/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs +++ b/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Agents; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; namespace Agents; diff --git a/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs b/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs index 8c7115ba1534..8549d40d14e2 100644 --- a/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs +++ b/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs @@ -293,7 +293,7 @@ private sealed class CacheRecord [VectorStoreData] public string Result { get; set; } - [VectorStoreVector(Dimensions: 1536)] + [VectorStoreVector(1536)] public ReadOnlyMemory PromptEmbedding { get; set; } } diff --git a/dotnet/samples/Concepts/Concepts.csproj b/dotnet/samples/Concepts/Concepts.csproj index ad6b3fe12a59..0aa9e2754fd7 100644 --- a/dotnet/samples/Concepts/Concepts.csproj +++ b/dotnet/samples/Concepts/Concepts.csproj @@ -9,6 +9,7 @@ true $(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0101,SKEXP0110,OPENAI001,CA1724,IDE1006,IDE0009,MEVD9000 + true Library 5ee045b0-aea3-4f08-8d31-32d1a6f8fed0 @@ -49,13 +50,13 @@ - - - - - - - + + + + + + + diff --git a/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs b/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs index 7e27f0a25bc3..8225f45c0dfd 100644 --- a/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs +++ b/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs @@ -3,7 +3,7 @@ using System.Text.Json; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel.Connectors.HuggingFace; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Embeddings; #pragma warning disable CS8602 // Dereference of a possibly null reference. @@ -52,7 +52,7 @@ public class Record [VectorStoreData] public string Text { get; set; } - [VectorStoreVector(Dimensions: 768)] + [VectorStoreVector(768)] public string Embedding { get; set; } } diff --git a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs index 2aa8c73a19c9..756ed559271b 100644 --- a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs +++ b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Pinecone; +using CommunityToolkit.VectorData.Pinecone; using Pinecone; namespace Memory.VectorStoreLangchainInterop; diff --git a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs index aa6a108a33b7..7cf1cefdb1be 100644 --- a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs +++ b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Redis; +using CommunityToolkit.VectorData.Redis; using StackExchange.Redis; namespace Memory.VectorStoreLangchainInterop; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs index 168014e1f0da..bdc2beed8224 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs @@ -6,7 +6,7 @@ using Azure.Search.Documents.Indexes; using Memory.VectorStoreFixtures; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.AzureAISearch; +using CommunityToolkit.VectorData.AzureAISearch; using Microsoft.SemanticKernel.Memory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs index 8d0f785f5c59..d34a506574e4 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs @@ -3,7 +3,7 @@ using System.Text.Json; using Memory.VectorStoreFixtures; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Qdrant; +using CommunityToolkit.VectorData.Qdrant; using Microsoft.SemanticKernel.Memory; using Qdrant.Client; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs index 4e2f6f107696..ed4ca0ff2995 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs @@ -2,7 +2,7 @@ using Memory.VectorStoreFixtures; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Redis; +using CommunityToolkit.VectorData.Redis; using Microsoft.SemanticKernel.Memory; using StackExchange.Redis; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs index 43130246517a..4e019033c5ba 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs @@ -8,9 +8,9 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.InMemory; -using Microsoft.SemanticKernel.Connectors.Qdrant; -using Microsoft.SemanticKernel.Connectors.Redis; +using CommunityToolkit.VectorData.InMemory; +using CommunityToolkit.VectorData.Qdrant; +using CommunityToolkit.VectorData.Redis; using Qdrant.Client; using StackExchange.Redis; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs index 669f9509b89d..43034235ccf6 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs @@ -6,7 +6,7 @@ using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Qdrant; +using CommunityToolkit.VectorData.Qdrant; using Qdrant.Client; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs b/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs index 6ed8de416340..e313bc3773f9 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs @@ -6,7 +6,7 @@ using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Qdrant; +using CommunityToolkit.VectorData.Qdrant; using Qdrant.Client; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs b/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs index 5192022abaa1..36db433079d1 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs @@ -6,7 +6,7 @@ using Azure.Search.Documents.Indexes; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.AzureAISearch; +using CommunityToolkit.VectorData.AzureAISearch; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs index 20952c325589..ee44ded0ba39 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs @@ -7,7 +7,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.AzureAISearch; +using CommunityToolkit.VectorData.AzureAISearch; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs index 034f59ff715b..4daea5e56133 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs index f3351416c039..b45c8059d5eb 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.PgVector; +using CommunityToolkit.VectorData.PgVector; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs index 4912c0b8e912..25d41d51c80e 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.Qdrant; +using CommunityToolkit.VectorData.Qdrant; using Qdrant.Client; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs index 9e0105aa65ed..14913a352b2a 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.Redis; +using CommunityToolkit.VectorData.Redis; using StackExchange.Redis; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs index b3a2cec40609..77a5acc3c088 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs @@ -4,7 +4,7 @@ using Azure.Identity; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs index 2bf34cd0c785..5a0ec54ff3fb 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs index 291198fd5b29..99b164a0efef 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs @@ -4,7 +4,7 @@ using Azure.Identity; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs b/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs index 2e2af26e7d93..da9a5bc288f3 100644 --- a/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs +++ b/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs @@ -5,7 +5,7 @@ using System.Text.Json; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Resources; diff --git a/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs b/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs index 132781e96393..fde3e081ebff 100644 --- a/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs +++ b/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.ChatCompletion; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.PromptTemplates.Handlebars; using Microsoft.SemanticKernel.Services; diff --git a/dotnet/samples/Concepts/RAG/WithPlugins.cs b/dotnet/samples/Concepts/RAG/WithPlugins.cs index 100b4f28a3f7..d4314cc806cc 100644 --- a/dotnet/samples/Concepts/RAG/WithPlugins.cs +++ b/dotnet/samples/Concepts/RAG/WithPlugins.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.PromptTemplates.Handlebars; using OpenAI; diff --git a/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs b/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs index 3bd36a4aaa25..edab8188e181 100644 --- a/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs +++ b/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using OpenAI; diff --git a/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj b/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj index 97b89013fef8..daed8e62911a 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj +++ b/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj @@ -6,6 +6,7 @@ enable enable $(NoWarn);SKEXP0001;SKEXP0010 + true c4203b00-7179-47c1-8701-ee352e381412 @@ -15,13 +16,13 @@ - - - - - - - + + + + + + + From cdc736059a4d5881d511da718d8ae00a415c9965 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 12:44:33 +0000 Subject: [PATCH 02/12] Address review feedback: add explanatory comments and remove SharpCompress/Snappier pins --- dotnet/Directory.Packages.props | 2 -- dotnet/samples/Concepts/Concepts.csproj | 3 +-- dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj | 3 +-- dotnet/src/VectorData/CosmosMongoDB/CosmosMongoDB.csproj | 2 -- dotnet/src/VectorData/MongoDB/MongoDB.csproj | 2 -- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index 7e901fa27b50..d2189e5903eb 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -174,8 +174,6 @@ - - diff --git a/dotnet/samples/Concepts/Concepts.csproj b/dotnet/samples/Concepts/Concepts.csproj index 0aa9e2754fd7..ddc464acedb3 100644 --- a/dotnet/samples/Concepts/Concepts.csproj +++ b/dotnet/samples/Concepts/Concepts.csproj @@ -9,6 +9,7 @@ true $(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0101,SKEXP0110,OPENAI001,CA1724,IDE1006,IDE0009,MEVD9000 + true Library 5ee045b0-aea3-4f08-8d31-32d1a6f8fed0 @@ -57,8 +58,6 @@ - - diff --git a/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj b/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj index daed8e62911a..e4640a13f8eb 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj +++ b/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj @@ -6,6 +6,7 @@ enable enable $(NoWarn);SKEXP0001;SKEXP0010 + true c4203b00-7179-47c1-8701-ee352e381412 @@ -23,8 +24,6 @@ - - diff --git a/dotnet/src/VectorData/CosmosMongoDB/CosmosMongoDB.csproj b/dotnet/src/VectorData/CosmosMongoDB/CosmosMongoDB.csproj index 23f8e0cba2db..b59178cf2183 100644 --- a/dotnet/src/VectorData/CosmosMongoDB/CosmosMongoDB.csproj +++ b/dotnet/src/VectorData/CosmosMongoDB/CosmosMongoDB.csproj @@ -30,8 +30,6 @@ - - diff --git a/dotnet/src/VectorData/MongoDB/MongoDB.csproj b/dotnet/src/VectorData/MongoDB/MongoDB.csproj index 6196ba1c4fee..a932c18a17f2 100644 --- a/dotnet/src/VectorData/MongoDB/MongoDB.csproj +++ b/dotnet/src/VectorData/MongoDB/MongoDB.csproj @@ -30,8 +30,6 @@ - - From 838a90d023e8b1149a3f9009cc45e9e8d2e428c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 12:52:17 +0000 Subject: [PATCH 03/12] Bump MongoDB.Driver to 3.10.0 --- dotnet/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index d2189e5903eb..cb74f242e32b 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -173,7 +173,7 @@ - + From 0bc26847649013c634a5677f8d5fc636b1250557 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 13:16:14 +0000 Subject: [PATCH 04/12] Migrate remaining SK connector package refs to CommunityToolkit.VectorData --- .../ChatWithAgent.ApiService.csproj | 2 +- .../MCPServer/MCPServer.csproj | 2 +- .../ModelContextProtocolClientServer/MCPServer/Program.cs | 2 +- dotnet/samples/Demos/OnnxSimpleRAG/OnnxSimpleRAG.csproj | 2 +- dotnet/samples/Demos/OnnxSimpleRAG/Program.cs | 2 +- .../GettingStartedWithTextSearch.csproj | 2 +- .../InMemoryVectorStoreFixture.cs | 2 +- .../GettingStartedWithVectorStores.csproj | 6 +++--- .../GettingStartedWithVectorStores/Step1_Ingest_Data.cs | 2 +- .../GettingStartedWithVectorStores/Step2_Vector_Search.cs | 2 +- .../Step3_Switch_VectorStore.cs | 4 ++-- .../Step4_Use_DynamicDataModel.cs | 2 +- .../SemanticKernel.UnitTests.csproj | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/ChatWithAgent.ApiService.csproj b/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/ChatWithAgent.ApiService.csproj index 09abe013258f..f53669471dff 100644 --- a/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/ChatWithAgent.ApiService.csproj +++ b/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/ChatWithAgent.ApiService.csproj @@ -14,7 +14,7 @@ - + diff --git a/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/MCPServer.csproj b/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/MCPServer.csproj index 55b4a187a65e..411324d8148c 100644 --- a/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/MCPServer.csproj +++ b/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/MCPServer.csproj @@ -32,7 +32,7 @@ - + diff --git a/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs b/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs index 856386d66827..6779ec049929 100644 --- a/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs +++ b/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs @@ -9,7 +9,7 @@ using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Agents; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using ModelContextProtocol.Protocol; using ModelContextProtocol.Server; diff --git a/dotnet/samples/Demos/OnnxSimpleRAG/OnnxSimpleRAG.csproj b/dotnet/samples/Demos/OnnxSimpleRAG/OnnxSimpleRAG.csproj index 9507fd81365c..e0e2dd55bc58 100644 --- a/dotnet/samples/Demos/OnnxSimpleRAG/OnnxSimpleRAG.csproj +++ b/dotnet/samples/Demos/OnnxSimpleRAG/OnnxSimpleRAG.csproj @@ -16,7 +16,7 @@ - + diff --git a/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs b/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs index 94d49fdd1707..d41629cb6ec5 100644 --- a/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs +++ b/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs @@ -9,7 +9,7 @@ using Microsoft.ML.OnnxRuntimeGenAI; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.ChatCompletion; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Connectors.Onnx; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.PromptTemplates.Handlebars; diff --git a/dotnet/samples/GettingStartedWithTextSearch/GettingStartedWithTextSearch.csproj b/dotnet/samples/GettingStartedWithTextSearch/GettingStartedWithTextSearch.csproj index 9eab7a6c81d7..29ac5e5b7e0b 100644 --- a/dotnet/samples/GettingStartedWithTextSearch/GettingStartedWithTextSearch.csproj +++ b/dotnet/samples/GettingStartedWithTextSearch/GettingStartedWithTextSearch.csproj @@ -35,7 +35,7 @@ - + diff --git a/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs b/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs index c409d53b8260..f93d94a6c60f 100644 --- a/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs +++ b/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using OpenAI; diff --git a/dotnet/samples/GettingStartedWithVectorStores/GettingStartedWithVectorStores.csproj b/dotnet/samples/GettingStartedWithVectorStores/GettingStartedWithVectorStores.csproj index b08f7cf0ce95..d911327ee3d6 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/GettingStartedWithVectorStores.csproj +++ b/dotnet/samples/GettingStartedWithVectorStores/GettingStartedWithVectorStores.csproj @@ -32,9 +32,9 @@ - - - + + + diff --git a/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs b/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs index 3f37685eebf0..31a53c7e5474 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; namespace GettingStartedWithVectorStores; diff --git a/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs b/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs index 11cec7a34ca8..0a6f8ad38d7c 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; namespace GettingStartedWithVectorStores; diff --git a/dotnet/samples/GettingStartedWithVectorStores/Step3_Switch_VectorStore.cs b/dotnet/samples/GettingStartedWithVectorStores/Step3_Switch_VectorStore.cs index da035fe5b5b2..1e8706fa9c76 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Step3_Switch_VectorStore.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Step3_Switch_VectorStore.cs @@ -2,8 +2,8 @@ using Azure; using Azure.Search.Documents.Indexes; -using Microsoft.SemanticKernel.Connectors.AzureAISearch; -using Microsoft.SemanticKernel.Connectors.Redis; +using CommunityToolkit.VectorData.AzureAISearch; +using CommunityToolkit.VectorData.Redis; using StackExchange.Redis; namespace GettingStartedWithVectorStores; diff --git a/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs b/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs index 3d93a1244818..050f42ff8391 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs @@ -2,7 +2,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Microsoft.SemanticKernel.Connectors.Redis; +using CommunityToolkit.VectorData.Redis; using StackExchange.Redis; namespace GettingStartedWithVectorStores; diff --git a/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj b/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj index 1bc01dd5df06..2059539232e4 100644 --- a/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj +++ b/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj @@ -25,13 +25,13 @@ - + From 16e29d6ca27c1a0c4651b5ce09a488ddb8aa8556 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 13:21:30 +0000 Subject: [PATCH 05/12] Switch SemanticKernel.UnitTests to CommunityToolkit.VectorData.InMemory package reference --- .../Data/TextSearchServiceCollectionExtensionsTests.cs | 2 +- .../Data/VectorStoreTextSearchTestBase.cs | 2 +- .../Data/VectorStoreTextSearchTests.cs | 2 +- .../SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs b/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs index ede2e742cade..9810ad4418e4 100644 --- a/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs +++ b/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.Embeddings; using Xunit; diff --git a/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs b/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs index 066cf7ef2398..efb588e402b2 100644 --- a/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs +++ b/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs @@ -8,7 +8,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.Embeddings; diff --git a/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTests.cs b/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTests.cs index c948240a5646..e3c05d079ae4 100644 --- a/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTests.cs +++ b/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTests.cs @@ -3,7 +3,7 @@ using System; using System.Linq; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Connectors.InMemory; +using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.Embeddings; using Xunit; diff --git a/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj b/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj index 2059539232e4..43e258c3c578 100644 --- a/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj +++ b/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj @@ -31,7 +31,10 @@ - + + + + From d66ada71a676c5740d23f56dd2afaa0cc8aa48e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 13:59:28 +0000 Subject: [PATCH 06/12] Fix build errors and using ordering for CommunityToolkit.VectorData migration --- .../Agents/ChatCompletion_ContextualFunctionSelection.cs | 2 +- dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs | 2 +- .../Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs | 2 +- .../Memory/VectorStoreLangchainInterop/PineconeFactory.cs | 2 +- .../Memory/VectorStoreLangchainInterop/RedisFactory.cs | 2 +- .../VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs | 2 +- .../Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs | 2 +- .../Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs | 2 +- .../Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs | 6 +++--- .../Concepts/Memory/VectorStore_DataIngestion_Simple.cs | 2 +- .../Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs | 2 +- .../Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs | 2 +- .../VectorStore_VectorSearch_MultiStore_AzureAISearch.cs | 2 +- .../Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs | 2 +- .../Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs | 2 +- .../Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs | 2 +- .../Memory/VectorStore_VectorSearch_MultiStore_Redis.cs | 2 +- .../Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs | 2 +- .../Concepts/Memory/VectorStore_VectorSearch_Paging.cs | 2 +- .../Concepts/Memory/VectorStore_VectorSearch_Simple.cs | 2 +- .../samples/Concepts/Memory/VolatileVectorStore_LoadData.cs | 2 +- .../samples/Concepts/Optimization/FrugalGPTWithFilters.cs | 2 +- dotnet/samples/Concepts/RAG/WithPlugins.cs | 2 +- dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs | 2 +- .../ModelContextProtocolClientServer/MCPServer/Program.cs | 2 +- dotnet/samples/Demos/OnnxSimpleRAG/Program.cs | 4 ++-- .../InMemoryVectorStoreFixture.cs | 2 +- dotnet/samples/GettingStartedWithVectorStores/Glossary.cs | 2 +- .../GettingStartedWithVectorStores/Step1_Ingest_Data.cs | 2 +- .../GettingStartedWithVectorStores/Step2_Vector_Search.cs | 2 +- .../Step4_Use_DynamicDataModel.cs | 2 +- dotnet/src/IntegrationTests/IntegrationTests.csproj | 1 + .../Plugins/ContextualFunctionProviderTests.cs | 2 +- .../Data/TextSearchServiceCollectionExtensionsTests.cs | 2 +- .../Data/VectorStoreTextSearchTestBase.cs | 2 +- 35 files changed, 38 insertions(+), 37 deletions(-) diff --git a/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs b/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs index 3962f69b1508..4b28a0025992 100644 --- a/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs +++ b/dotnet/samples/Concepts/Agents/ChatCompletion_ContextualFunctionSelection.cs @@ -2,10 +2,10 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Agents; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Functions; namespace Agents; diff --git a/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs b/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs index a1f4261ebc4b..ef9bbd602fc5 100644 --- a/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs +++ b/dotnet/samples/Concepts/Agents/ChatCompletion_Rag.cs @@ -2,11 +2,11 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Agents; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; namespace Agents; diff --git a/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs b/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs index 8225f45c0dfd..06068932ed1c 100644 --- a/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs +++ b/dotnet/samples/Concepts/Memory/HuggingFace_TextEmbeddingCustomHttpHandler.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft. All rights reserved. using System.Text.Json; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel.Connectors.HuggingFace; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Embeddings; #pragma warning disable CS8602 // Dereference of a possibly null reference. diff --git a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs index 756ed559271b..ef515378a4a5 100644 --- a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs +++ b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. -using Microsoft.Extensions.VectorData; using CommunityToolkit.VectorData.Pinecone; +using Microsoft.Extensions.VectorData; using Pinecone; namespace Memory.VectorStoreLangchainInterop; diff --git a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs index 7cf1cefdb1be..013d80122d76 100644 --- a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs +++ b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/RedisFactory.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. -using Microsoft.Extensions.VectorData; using CommunityToolkit.VectorData.Redis; +using Microsoft.Extensions.VectorData; using StackExchange.Redis; namespace Memory.VectorStoreLangchainInterop; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs index bdc2beed8224..c168d9704d11 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_AzureAISearch.cs @@ -4,9 +4,9 @@ using System.Text.Json; using Azure; using Azure.Search.Documents.Indexes; +using CommunityToolkit.VectorData.AzureAISearch; using Memory.VectorStoreFixtures; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.AzureAISearch; using Microsoft.SemanticKernel.Memory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs index d34a506574e4..95bafe4e9ac6 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Qdrant.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft. All rights reserved. using System.Text.Json; +using CommunityToolkit.VectorData.Qdrant; using Memory.VectorStoreFixtures; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.Qdrant; using Microsoft.SemanticKernel.Memory; using Qdrant.Client; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs index ed4ca0ff2995..452f658c36ae 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_ConsumeFromMemoryStore_Redis.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. +using CommunityToolkit.VectorData.Redis; using Memory.VectorStoreFixtures; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.Redis; using Microsoft.SemanticKernel.Memory; using StackExchange.Redis; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs index 4e019033c5ba..c2b24d0d8607 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_MultiStore.cs @@ -3,14 +3,14 @@ using System.Text.Json; using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.InMemory; +using CommunityToolkit.VectorData.Qdrant; +using CommunityToolkit.VectorData.Redis; using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.InMemory; -using CommunityToolkit.VectorData.Qdrant; -using CommunityToolkit.VectorData.Redis; using Qdrant.Client; using StackExchange.Redis; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs index 43034235ccf6..82652063f703 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_DataIngestion_Simple.cs @@ -3,10 +3,10 @@ using System.Text.Json; using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.Qdrant; using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.Qdrant; using Qdrant.Client; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs b/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs index e313bc3773f9..a9670b18ccc7 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_DynamicDataModel_Interop.cs @@ -3,10 +3,10 @@ using System.Text.Json; using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.Qdrant; using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.Qdrant; using Qdrant.Client; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs b/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs index 36db433079d1..f0be86cc9294 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_HybridSearch_Simple_AzureAISearch.cs @@ -4,9 +4,9 @@ using Azure.AI.OpenAI; using Azure.Identity; using Azure.Search.Documents.Indexes; +using CommunityToolkit.VectorData.AzureAISearch; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.AzureAISearch; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs index ee44ded0ba39..81cd303017d6 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_AzureAISearch.cs @@ -4,10 +4,10 @@ using Azure.AI.OpenAI; using Azure.Identity; using Azure.Search.Documents.Indexes; +using CommunityToolkit.VectorData.AzureAISearch; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.AzureAISearch; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs index 4daea5e56133..f88f893c489d 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_InMemory.cs @@ -2,10 +2,10 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.InMemory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs index b45c8059d5eb..3995ba486c87 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Postgres.cs @@ -2,11 +2,11 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.PgVector; using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.PgVector; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs index 25d41d51c80e..3640c4ba7330 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Qdrant.cs @@ -2,11 +2,11 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.Qdrant; using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.Qdrant; using Qdrant.Client; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs index 14913a352b2a..ae8e2e1d2bab 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiStore_Redis.cs @@ -2,11 +2,11 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.Redis; using Memory.VectorStoreFixtures; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.Redis; using StackExchange.Redis; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs index 77a5acc3c088..99707dd0cf62 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_MultiVector.cs @@ -2,9 +2,9 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.InMemory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs index 5a0ec54ff3fb..60ffef9cea61 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Paging.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. -using Microsoft.Extensions.VectorData; using CommunityToolkit.VectorData.InMemory; +using Microsoft.Extensions.VectorData; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs index 99b164a0efef..bae6fe82175a 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_VectorSearch_Simple.cs @@ -2,9 +2,9 @@ using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.InMemory; namespace Memory; diff --git a/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs b/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs index da9a5bc288f3..dc14c1acf8e7 100644 --- a/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs +++ b/dotnet/samples/Concepts/Memory/VolatileVectorStore_LoadData.cs @@ -3,9 +3,9 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Text.Json; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Resources; diff --git a/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs b/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs index fde3e081ebff..1bd908f6d17a 100644 --- a/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs +++ b/dotnet/samples/Concepts/Optimization/FrugalGPTWithFilters.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft. All rights reserved. using System.Runtime.CompilerServices; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.ChatCompletion; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.PromptTemplates.Handlebars; using Microsoft.SemanticKernel.Services; diff --git a/dotnet/samples/Concepts/RAG/WithPlugins.cs b/dotnet/samples/Concepts/RAG/WithPlugins.cs index d4314cc806cc..ac4055e95f0f 100644 --- a/dotnet/samples/Concepts/RAG/WithPlugins.cs +++ b/dotnet/samples/Concepts/RAG/WithPlugins.cs @@ -2,10 +2,10 @@ using System.Net.Http.Headers; using System.Text.Json; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.PromptTemplates.Handlebars; using OpenAI; diff --git a/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs b/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs index edab8188e181..9de850430186 100644 --- a/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs +++ b/dotnet/samples/Concepts/Search/VectorStore_TextSearch.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using OpenAI; diff --git a/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs b/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs index 6779ec049929..27644394af45 100644 --- a/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs +++ b/dotnet/samples/Demos/ModelContextProtocolClientServer/MCPServer/Program.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. +using CommunityToolkit.VectorData.InMemory; using MCPServer; using MCPServer.ProjectResources; using MCPServer.Prompts; @@ -9,7 +10,6 @@ using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Agents; -using CommunityToolkit.VectorData.InMemory; using ModelContextProtocol.Protocol; using ModelContextProtocol.Server; diff --git a/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs b/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs index d41629cb6ec5..96bb361b7554 100644 --- a/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs +++ b/dotnet/samples/Demos/OnnxSimpleRAG/Program.cs @@ -3,13 +3,13 @@ using System; using System.IO; using System.Linq; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.VectorData; using Microsoft.ML.OnnxRuntimeGenAI; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.ChatCompletion; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Connectors.Onnx; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.PromptTemplates.Handlebars; @@ -134,6 +134,6 @@ internal sealed class InformationItem [TextSearchResultValue] public string Text { get; set; } = string.Empty; - [VectorStoreVector(Dimensions: 384)] + [VectorStoreVector(384)] public string Embedding => this.Text; } diff --git a/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs b/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs index f93d94a6c60f..6cd2d692c1d5 100644 --- a/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs +++ b/dotnet/samples/GettingStartedWithTextSearch/InMemoryVectorStoreFixture.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft. All rights reserved. using System.Reflection; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using OpenAI; diff --git a/dotnet/samples/GettingStartedWithVectorStores/Glossary.cs b/dotnet/samples/GettingStartedWithVectorStores/Glossary.cs index 1516c0d35230..0d5fadb3b2fb 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Glossary.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Glossary.cs @@ -25,6 +25,6 @@ internal sealed class Glossary [VectorStoreData] public string Definition { get; set; } - [VectorStoreVector(Dimensions: 1536)] + [VectorStoreVector(1536)] public ReadOnlyMemory DefinitionEmbedding { get; set; } } diff --git a/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs b/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs index 31a53c7e5474..3b98cc037344 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Step1_Ingest_Data.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.InMemory; namespace GettingStartedWithVectorStores; diff --git a/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs b/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs index 0a6f8ad38d7c..a8079a0732e3 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Step2_Vector_Search.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.InMemory; namespace GettingStartedWithVectorStores; diff --git a/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs b/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs index 050f42ff8391..6d433b594d1d 100644 --- a/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs +++ b/dotnet/samples/GettingStartedWithVectorStores/Step4_Use_DynamicDataModel.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. +using CommunityToolkit.VectorData.Redis; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using CommunityToolkit.VectorData.Redis; using StackExchange.Redis; namespace GettingStartedWithVectorStores; diff --git a/dotnet/src/IntegrationTests/IntegrationTests.csproj b/dotnet/src/IntegrationTests/IntegrationTests.csproj index 7ed606ec711d..4e739bf9a96a 100644 --- a/dotnet/src/IntegrationTests/IntegrationTests.csproj +++ b/dotnet/src/IntegrationTests/IntegrationTests.csproj @@ -56,6 +56,7 @@ + diff --git a/dotnet/src/IntegrationTests/Plugins/ContextualFunctionProviderTests.cs b/dotnet/src/IntegrationTests/Plugins/ContextualFunctionProviderTests.cs index d28fc150aeaf..3bdc20dc3e52 100644 --- a/dotnet/src/IntegrationTests/Plugins/ContextualFunctionProviderTests.cs +++ b/dotnet/src/IntegrationTests/Plugins/ContextualFunctionProviderTests.cs @@ -7,12 +7,12 @@ using System.Threading.Tasks; using Azure.AI.OpenAI; using Azure.Identity; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Agents; -using Microsoft.SemanticKernel.Connectors.InMemory; using Microsoft.SemanticKernel.Functions; using SemanticKernel.IntegrationTests.TestSettings; using Xunit; diff --git a/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs b/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs index 9810ad4418e4..a7b79dcc0ed8 100644 --- a/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs +++ b/dotnet/src/SemanticKernel.UnitTests/Data/TextSearchServiceCollectionExtensionsTests.cs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft. All rights reserved. using System; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.Embeddings; using Xunit; diff --git a/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs b/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs index efb588e402b2..dc0422c2b4a2 100644 --- a/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs +++ b/dotnet/src/SemanticKernel.UnitTests/Data/VectorStoreTextSearchTestBase.cs @@ -5,10 +5,10 @@ using System.Collections.ObjectModel; using System.Threading; using System.Threading.Tasks; +using CommunityToolkit.VectorData.InMemory; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel; -using CommunityToolkit.VectorData.InMemory; using Microsoft.SemanticKernel.Data; using Microsoft.SemanticKernel.Embeddings; From 0f534e334590d9f1a77d8241a539379327b41496 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 14:24:01 +0000 Subject: [PATCH 07/12] Bump MEVData.Abstractions to 10.5.2 and add class constraint to VectorStoreTextSearch --- dotnet/Directory.Packages.props | 4 +- .../CompatibilitySuppressions.xml | 67 +++++++++++++++++++ .../TextSearchKernelBuilderExtensions.cs | 1 + .../TextSearchServiceCollectionExtensions.cs | 1 + .../Data/TextSearch/VectorStoreTextSearch.cs | 1 + 5 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 dotnet/src/SemanticKernel.Core/CompatibilitySuppressions.xml diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index cb74f242e32b..d767c5894545 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -126,7 +126,7 @@ - + @@ -152,7 +152,7 @@ - + diff --git a/dotnet/src/SemanticKernel.Core/CompatibilitySuppressions.xml b/dotnet/src/SemanticKernel.Core/CompatibilitySuppressions.xml new file mode 100644 index 000000000000..e0feb2bf67a3 --- /dev/null +++ b/dotnet/src/SemanticKernel.Core/CompatibilitySuppressions.xml @@ -0,0 +1,67 @@ + + + + + CP0021 + M:Microsoft.SemanticKernel.TextSearchKernelBuilderExtensions.AddVectorStoreTextSearch``1(Microsoft.SemanticKernel.IKernelBuilder,Microsoft.SemanticKernel.Data.ITextSearchStringMapper,Microsoft.SemanticKernel.Data.ITextSearchResultMapper,Microsoft.SemanticKernel.Data.VectorStoreTextSearchOptions,System.String)``0:class + lib/net10.0/Microsoft.SemanticKernel.Core.dll + lib/net10.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + M:Microsoft.SemanticKernel.TextSearchServiceCollectionExtensions.AddVectorStoreTextSearch``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,Microsoft.SemanticKernel.Data.ITextSearchStringMapper,Microsoft.SemanticKernel.Data.ITextSearchResultMapper,Microsoft.SemanticKernel.Data.VectorStoreTextSearchOptions,System.String)``0:class + lib/net10.0/Microsoft.SemanticKernel.Core.dll + lib/net10.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + T:Microsoft.SemanticKernel.Data.VectorStoreTextSearch`1``0:class + lib/net10.0/Microsoft.SemanticKernel.Core.dll + lib/net10.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + M:Microsoft.SemanticKernel.TextSearchKernelBuilderExtensions.AddVectorStoreTextSearch``1(Microsoft.SemanticKernel.IKernelBuilder,Microsoft.SemanticKernel.Data.ITextSearchStringMapper,Microsoft.SemanticKernel.Data.ITextSearchResultMapper,Microsoft.SemanticKernel.Data.VectorStoreTextSearchOptions,System.String)``0:class + lib/net8.0/Microsoft.SemanticKernel.Core.dll + lib/net8.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + M:Microsoft.SemanticKernel.TextSearchServiceCollectionExtensions.AddVectorStoreTextSearch``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,Microsoft.SemanticKernel.Data.ITextSearchStringMapper,Microsoft.SemanticKernel.Data.ITextSearchResultMapper,Microsoft.SemanticKernel.Data.VectorStoreTextSearchOptions,System.String)``0:class + lib/net8.0/Microsoft.SemanticKernel.Core.dll + lib/net8.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + T:Microsoft.SemanticKernel.Data.VectorStoreTextSearch`1``0:class + lib/net8.0/Microsoft.SemanticKernel.Core.dll + lib/net8.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + M:Microsoft.SemanticKernel.TextSearchKernelBuilderExtensions.AddVectorStoreTextSearch``1(Microsoft.SemanticKernel.IKernelBuilder,Microsoft.SemanticKernel.Data.ITextSearchStringMapper,Microsoft.SemanticKernel.Data.ITextSearchResultMapper,Microsoft.SemanticKernel.Data.VectorStoreTextSearchOptions,System.String)``0:class + lib/netstandard2.0/Microsoft.SemanticKernel.Core.dll + lib/netstandard2.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + M:Microsoft.SemanticKernel.TextSearchServiceCollectionExtensions.AddVectorStoreTextSearch``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,Microsoft.SemanticKernel.Data.ITextSearchStringMapper,Microsoft.SemanticKernel.Data.ITextSearchResultMapper,Microsoft.SemanticKernel.Data.VectorStoreTextSearchOptions,System.String)``0:class + lib/netstandard2.0/Microsoft.SemanticKernel.Core.dll + lib/netstandard2.0/Microsoft.SemanticKernel.Core.dll + true + + + CP0021 + T:Microsoft.SemanticKernel.Data.VectorStoreTextSearch`1``0:class + lib/netstandard2.0/Microsoft.SemanticKernel.Core.dll + lib/netstandard2.0/Microsoft.SemanticKernel.Core.dll + true + + \ No newline at end of file diff --git a/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchKernelBuilderExtensions.cs b/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchKernelBuilderExtensions.cs index 84909b8229c9..fa421d45a2bf 100644 --- a/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchKernelBuilderExtensions.cs +++ b/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchKernelBuilderExtensions.cs @@ -24,6 +24,7 @@ public static class TextSearchKernelBuilderExtensions ITextSearchResultMapper? resultMapper = null, VectorStoreTextSearchOptions? options = null, string? serviceId = default) + where TRecord : class { builder.Services.AddVectorStoreTextSearch(stringMapper, resultMapper, options, serviceId); return builder; diff --git a/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchServiceCollectionExtensions.cs b/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchServiceCollectionExtensions.cs index 950cb46777af..5a60592cce25 100644 --- a/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchServiceCollectionExtensions.cs +++ b/dotnet/src/SemanticKernel.Core/Data/TextSearch/TextSearchServiceCollectionExtensions.cs @@ -28,6 +28,7 @@ public static class TextSearchServiceCollectionExtensions ITextSearchResultMapper? resultMapper = null, VectorStoreTextSearchOptions? options = null, string? serviceId = default) + where TRecord : class { // If we are not constructing the dependent services, add the VectorStoreTextSearch as transient, since we // cannot make assumptions about how dependent services are being managed. diff --git a/dotnet/src/SemanticKernel.Core/Data/TextSearch/VectorStoreTextSearch.cs b/dotnet/src/SemanticKernel.Core/Data/TextSearch/VectorStoreTextSearch.cs index c83bdbcbddb9..eb26852881ce 100644 --- a/dotnet/src/SemanticKernel.Core/Data/TextSearch/VectorStoreTextSearch.cs +++ b/dotnet/src/SemanticKernel.Core/Data/TextSearch/VectorStoreTextSearch.cs @@ -21,6 +21,7 @@ namespace Microsoft.SemanticKernel.Data; [Experimental("SKEXP0001")] #pragma warning disable CS0618 // ITextSearch is obsolete public sealed class VectorStoreTextSearch<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] TRecord> : ITextSearch, ITextSearch + where TRecord : class #pragma warning restore CS0618 #pragma warning restore CA1711 // Identifiers should not have incorrect suffix { From 9a48e53bd4621ba591737f61e184b552b9764ec1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 14:59:28 +0000 Subject: [PATCH 08/12] Add where TRecord : class constraint to MockVectorizableTextSearch --- .../UnitTests/Search/MockVectorizableTextSearch.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/dotnet/src/SemanticKernel.AotTests/UnitTests/Search/MockVectorizableTextSearch.cs b/dotnet/src/SemanticKernel.AotTests/UnitTests/Search/MockVectorizableTextSearch.cs index 3390ec374ff5..09c4a6ddbbca 100644 --- a/dotnet/src/SemanticKernel.AotTests/UnitTests/Search/MockVectorizableTextSearch.cs +++ b/dotnet/src/SemanticKernel.AotTests/UnitTests/Search/MockVectorizableTextSearch.cs @@ -5,6 +5,7 @@ namespace SemanticKernel.AotTests.UnitTests.Search; internal sealed class MockVectorizableTextSearch : IVectorSearchable + where TRecord : class { private readonly IAsyncEnumerable> _searchResults; From 0030f243d6f076dcbe3a305d0f9729ae6e1a4aa5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 15:37:19 +0000 Subject: [PATCH 09/12] Exclude PathUtilities.cs from RestrictedInternalUtilities.props --- .../src/InternalUtilities/src/RestrictedInternalUtilities.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotnet/src/InternalUtilities/src/RestrictedInternalUtilities.props b/dotnet/src/InternalUtilities/src/RestrictedInternalUtilities.props index fddc4409da7c..ecbf07ef859d 100644 --- a/dotnet/src/InternalUtilities/src/RestrictedInternalUtilities.props +++ b/dotnet/src/InternalUtilities/src/RestrictedInternalUtilities.props @@ -5,6 +5,8 @@ --> + + From 8758fb019e660fba8664c173e207258f65f81950 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:55:54 +0000 Subject: [PATCH 10/12] Remove Pinecone support, update CommunityToolkit.VectorData to 1.0.0, simplify UnitTests csproj --- dotnet/Directory.Packages.props | 21 +++-- dotnet/samples/Concepts/Concepts.csproj | 1 - .../PineconeFactory.cs | 87 ------------------- .../Memory/VectorStore_Langchain_Interop.cs | 12 --- .../SemanticKernel.UnitTests.csproj | 5 +- 5 files changed, 11 insertions(+), 115 deletions(-) delete mode 100644 dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index d767c5894545..cfa07f0093d6 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -91,7 +91,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -200,15 +200,14 @@ - - - - - - - - - + + + + + + + + diff --git a/dotnet/samples/Concepts/Concepts.csproj b/dotnet/samples/Concepts/Concepts.csproj index ddc464acedb3..5345cdface12 100644 --- a/dotnet/samples/Concepts/Concepts.csproj +++ b/dotnet/samples/Concepts/Concepts.csproj @@ -55,7 +55,6 @@ - diff --git a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs b/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs deleted file mode 100644 index ef515378a4a5..000000000000 --- a/dotnet/samples/Concepts/Memory/VectorStoreLangchainInterop/PineconeFactory.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. - -using CommunityToolkit.VectorData.Pinecone; -using Microsoft.Extensions.VectorData; -using Pinecone; - -namespace Memory.VectorStoreLangchainInterop; - -/// -/// Contains a factory method that can be used to create a Pinecone vector store that is compatible with datasets ingested using Langchain. -/// -/// -/// This class is used with the sample. -/// -public static class PineconeFactory -{ - /// - /// Record definition that matches the storage format used by Langchain for Pinecone. - /// - private static readonly VectorStoreCollectionDefinition s_definition = new() - { - Properties = - [ - new VectorStoreKeyProperty("Key", typeof(string)), - new VectorStoreDataProperty("Content", typeof(string)) { StorageName = "text" }, - new VectorStoreDataProperty("Source", typeof(string)) { StorageName = "source" }, - new VectorStoreVectorProperty("Embedding", typeof(ReadOnlyMemory), 1536) { StorageName = "embedding" } - ] - }; - - /// - /// Create a new Pinecone-backed that can be used to read data that was ingested using Langchain. - /// - /// Pinecone client that can be used to manage the collections and points in a Pinecone store. - /// The . - public static VectorStore CreatePineconeLangchainInteropVectorStore(PineconeClient pineconeClient) - => new PineconeLangchainInteropVectorStore(new PineconeVectorStore(pineconeClient), pineconeClient); - - private sealed class PineconeLangchainInteropVectorStore( - VectorStore innerStore, - PineconeClient pineconeClient) - : VectorStore - { - private readonly PineconeClient _pineconeClient = pineconeClient; - - public override VectorStoreCollection GetCollection(string name, VectorStoreCollectionDefinition? definition = null) - { - if (typeof(TKey) != typeof(string) || typeof(TRecord) != typeof(LangchainDocument)) - { - throw new NotSupportedException("This VectorStore is only usable with string keys and LangchainDocument record types"); - } - - // Create a Pinecone collection and pass in our custom record definition that matches - // the schema used by Langchain so that the default mapper can use the storage names - // in it, to map to the storage scheme. - return (new PineconeCollection( - _pineconeClient, - name, - new() - { - Definition = s_definition - }) as VectorStoreCollection)!; - } - - public override VectorStoreCollection> GetDynamicCollection(string name, VectorStoreCollectionDefinition? definition = null) - { - // Create a Pinecone collection and pass in our custom record definition that matches - // the schema used by Langchain so that the default mapper can use the storage names - // in it, to map to the storage scheme. - return new PineconeDynamicCollection( - _pineconeClient, - name, - new() - { - Definition = s_definition - }); - } - - public override object? GetService(Type serviceType, object? serviceKey = null) => innerStore.GetService(serviceType, serviceKey); - - public override IAsyncEnumerable ListCollectionNamesAsync(CancellationToken cancellationToken = default) => innerStore.ListCollectionNamesAsync(cancellationToken); - - public override Task CollectionExistsAsync(string name, CancellationToken cancellationToken = default) => innerStore.CollectionExistsAsync(name, cancellationToken); - - public override Task EnsureCollectionDeletedAsync(string name, CancellationToken cancellationToken = default) => innerStore.EnsureCollectionDeletedAsync(name, cancellationToken); - } -} diff --git a/dotnet/samples/Concepts/Memory/VectorStore_Langchain_Interop.cs b/dotnet/samples/Concepts/Memory/VectorStore_Langchain_Interop.cs index a31e9cead6e7..234d7314d307 100644 --- a/dotnet/samples/Concepts/Memory/VectorStore_Langchain_Interop.cs +++ b/dotnet/samples/Concepts/Memory/VectorStore_Langchain_Interop.cs @@ -5,7 +5,6 @@ using Memory.VectorStoreLangchainInterop; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; -using Pinecone; using StackExchange.Redis; namespace Memory; @@ -25,17 +24,6 @@ namespace Memory; /// public class VectorStore_Langchain_Interop(ITestOutputHelper output) : BaseTest(output) { - /// - /// Shows how to read data from a Pinecone collection that was created and ingested using Langchain. - /// - [Fact] - public async Task ReadDataFromLangchainPineconeAsync() - { - var pineconeClient = new PineconeClient(TestConfiguration.Pinecone.ApiKey); - var vectorStore = PineconeFactory.CreatePineconeLangchainInteropVectorStore(pineconeClient); - await this.ReadDataFromCollectionAsync(vectorStore, "pets"); - } - /// /// Shows how to read data from a Redis collection that was created and ingested using Langchain. /// diff --git a/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj b/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj index 43e258c3c578..1394535f761d 100644 --- a/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj +++ b/dotnet/src/SemanticKernel.UnitTests/SemanticKernel.UnitTests.csproj @@ -25,6 +25,7 @@ + @@ -33,10 +34,6 @@ - - - - From 3311f966199c99d0a671471f2fc9e9a0559eb31a Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Wed, 22 Jul 2026 13:59:10 +0200 Subject: [PATCH 11/12] Apply suggestions from code review Co-authored-by: Adam Sitnik --- dotnet/Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index cfa07f0093d6..2fc6f76d2264 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -91,7 +91,7 @@ - + @@ -115,7 +115,7 @@ - + From e1bf33c7774b194c3e57c86320fe536c595c28f0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Jul 2026 12:09:40 +0000 Subject: [PATCH 12/12] Restore Npgsql 10.0.3 and System.Numerics.Tensors 10.0.9 version bumps --- dotnet/Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index 2fc6f76d2264..cfa07f0093d6 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -91,7 +91,7 @@ - + @@ -115,7 +115,7 @@ - +