Skip to content

Commit abf10dd

Browse files
Copilotadamsitnik
andauthored
Update CommunityToolkit VectorData package names (#14333)
### Motivation and Context CommunityToolkit/AI renamed the Cosmos MongoDB and Cosmos NoSQL VectorData providers. Semantic Kernel references should point to the renamed packages and source locations. ### Description - **README links** - Updated Cosmos MongoDB README to `MEVD/src/AzureDocumentDB` - Updated Cosmos NoSQL README to `MEVD/src/AzureCosmosDB` - **Central package versions** - `CommunityToolkit.VectorData.CosmosMongoDB` → `CommunityToolkit.VectorData.AzureDocumentDB` - `CommunityToolkit.VectorData.CosmosNoSql` → `CommunityToolkit.VectorData.AzureCosmosDB` - **Sample references** - Updated affected sample project package references. - Updated renamed extension method call sites: - `AddCosmosMongo...` → `AddDocumentDB...` - `AddCosmosNoSql...` → `AddCosmos...` ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
1 parent 6eab62d commit abf10dd

12 files changed

Lines changed: 35 additions & 35 deletions

File tree

‎dotnet/Directory.Packages.props‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@
187187
<PackageVersion Include="Testcontainers.MongoDB" Version="4.14.0" />
188188
<!-- VectorData Dependencies -->
189189
<PackageVersion Include="CommunityToolkit.VectorData.AzureAISearch" Version="1.0.0" />
190-
<PackageVersion Include="CommunityToolkit.VectorData.CosmosMongoDB" Version="1.0.0" />
191-
<PackageVersion Include="CommunityToolkit.VectorData.CosmosNoSql" Version="1.0.0" />
190+
<PackageVersion Include="CommunityToolkit.VectorData.AzureDocumentDB" Version="1.0.0" />
191+
<PackageVersion Include="CommunityToolkit.VectorData.AzureCosmosDB" Version="1.0.0" />
192192
<PackageVersion Include="CommunityToolkit.VectorData.InMemory" Version="1.0.1" />
193193
<PackageVersion Include="CommunityToolkit.VectorData.PgVector" Version="1.0.0" />
194194
<PackageVersion Include="CommunityToolkit.VectorData.Qdrant" Version="1.0.0" />

‎dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ public async Task RedisCacheAsync()
7777
}
7878

7979
/// <summary>
80-
/// Executing similar requests two times using Azure Cosmos DB for MongoDB caching store to compare execution time and results.
80+
/// Executing similar requests two times using Azure DocumentDB caching store to compare execution time and results.
8181
/// Second execution is faster, because the result is returned from cache.
82-
/// How to setup Azure Cosmos DB for MongoDB cluster: https://learn.microsoft.com/en-gb/azure/cosmos-db/mongodb/vcore/quickstart-portal
82+
/// How to set up Azure DocumentDB: https://learn.microsoft.com/azure/documentdb/quickstart-portal
8383
/// </summary>
8484
[Fact]
85-
public async Task CosmosMongoDBCacheAsync()
85+
public async Task DocumentDbCacheAsync()
8686
{
8787
var kernel = GetKernelWithCache(services =>
8888
{
89-
services.AddCosmosMongoVectorStore(
90-
TestConfiguration.CosmosMongo.ConnectionString,
91-
TestConfiguration.CosmosMongo.DatabaseName);
89+
services.AddDocumentDBVectorStore(
90+
TestConfiguration.AzureDocumentDb.ConnectionString,
91+
TestConfiguration.AzureDocumentDb.DatabaseName);
9292
});
9393

9494
var result1 = await ExecuteAsync(kernel, "First run", "What's the tallest building in New York?");

‎dotnet/samples/Concepts/Concepts.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<IsTestProject>true</IsTestProject>
1010
<!-- Suppress: "Declare types in namespaces", "Require ConfigureAwait", "Experimental" -->
1111
<NoWarn>$(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</NoWarn>
12-
<!-- CommunityToolkit.VectorData.CosmosNoSql pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
12+
<!-- CommunityToolkit.VectorData.AzureCosmosDB pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
1313
<AzureCosmosDisableNewtonsoftJsonCheck>true</AzureCosmosDisableNewtonsoftJsonCheck>
1414
<OutputType>Library</OutputType>
1515
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
@@ -52,7 +52,7 @@
5252
<PackageReference Include="AWSSDK.SecurityToken" />
5353
<PackageReference Include="Grpc.Net.ClientFactory" />
5454
<PackageReference Include="CommunityToolkit.VectorData.AzureAISearch" />
55-
<PackageReference Include="CommunityToolkit.VectorData.CosmosMongoDB" />
55+
<PackageReference Include="CommunityToolkit.VectorData.AzureDocumentDB" />
5656
<PackageReference Include="CommunityToolkit.VectorData.InMemory" />
5757
<PackageReference Include="CommunityToolkit.VectorData.Qdrant" />
5858
<PackageReference Include="CommunityToolkit.VectorData.PgVector" />

‎dotnet/samples/Demos/VectorStoreRAG/Options/ApplicationConfig.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal sealed class ApplicationConfig
1515
private readonly OpenAIEmbeddingsConfig _openAIEmbeddingsConfig = new();
1616
private readonly RagConfig _ragConfig = new();
1717
private readonly AzureAISearchConfig _azureAISearchConfig = new();
18-
private readonly CosmosConfig _cosmosMongoConfig = new();
18+
private readonly CosmosConfig _azureDocumentDBConfig = new();
1919
private readonly CosmosConfig _cosmosNoSqlConfig = new();
2020
private readonly QdrantConfig _qdrantConfig = new();
2121
private readonly RedisConfig _redisConfig = new();
@@ -43,8 +43,8 @@ public ApplicationConfig(ConfigurationManager configurationManager)
4343
.GetRequiredSection($"VectorStores:{AzureAISearchConfig.ConfigSectionName}")
4444
.Bind(this._azureAISearchConfig);
4545
configurationManager
46-
.GetRequiredSection($"VectorStores:{CosmosConfig.MongoConfigSectionName}")
47-
.Bind(this._cosmosMongoConfig);
46+
.GetRequiredSection($"VectorStores:{CosmosConfig.DocumentDBConfigSectionName}")
47+
.Bind(this._azureDocumentDBConfig);
4848
configurationManager
4949
.GetRequiredSection($"VectorStores:{CosmosConfig.NoSqlConfigSectionName}")
5050
.Bind(this._cosmosNoSqlConfig);
@@ -71,7 +71,7 @@ public ApplicationConfig(ConfigurationManager configurationManager)
7171

7272
public AzureAISearchConfig AzureAISearchConfig => this._azureAISearchConfig;
7373

74-
public CosmosConfig CosmosMongoConfig => this._cosmosMongoConfig;
74+
public CosmosConfig AzureDocumentDBConfig => this._azureDocumentDBConfig;
7575

7676
public CosmosConfig CosmosNoSqlConfig => this._cosmosNoSqlConfig;
7777

‎dotnet/samples/Demos/VectorStoreRAG/Options/CosmosConfig.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
namespace VectorStoreRAG.Options;
66

77
/// <summary>
8-
/// Azure CosmosDB service settings for use with CosmosMongo and CosmosNoSql.
8+
/// Azure DocumentDB and Azure Cosmos DB service settings.
99
/// </summary>
1010
internal sealed class CosmosConfig
1111
{
12-
public const string MongoConfigSectionName = "CosmosMongoDB";
12+
public const string DocumentDBConfigSectionName = "AzureDocumentDB";
1313
public const string NoSqlConfigSectionName = "CosmosNoSql";
1414

1515
[Required]

‎dotnet/samples/Demos/VectorStoreRAG/Program.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@
7676
new Uri(appConfig.AzureAISearchConfig.Endpoint),
7777
new AzureKeyCredential(appConfig.AzureAISearchConfig.ApiKey));
7878
break;
79-
case "CosmosMongoDB":
80-
kernelBuilder.Services.AddCosmosMongoCollection<TextSnippet<string>>(
79+
case "AzureDocumentDB":
80+
kernelBuilder.Services.AddDocumentDBCollection<TextSnippet<string>>(
8181
appConfig.RagConfig.CollectionName,
82-
appConfig.CosmosMongoConfig.ConnectionString,
83-
appConfig.CosmosMongoConfig.DatabaseName);
82+
appConfig.AzureDocumentDBConfig.ConnectionString,
83+
appConfig.AzureDocumentDBConfig.DatabaseName);
8484
break;
8585
case "CosmosNoSql":
86-
kernelBuilder.Services.AddCosmosNoSqlCollection<string, TextSnippet<string>>(
86+
kernelBuilder.Services.AddCosmosCollection<string, TextSnippet<string>>(
8787
appConfig.RagConfig.CollectionName,
8888
appConfig.CosmosNoSqlConfig.ConnectionString,
8989
appConfig.CosmosNoSqlConfig.DatabaseName);
@@ -120,7 +120,7 @@
120120
switch (appConfig.RagConfig.VectorStoreType)
121121
{
122122
case "AzureAISearch":
123-
case "CosmosMongoDB":
123+
case "AzureDocumentDB":
124124
case "CosmosNoSql":
125125
case "InMemory":
126126
case "Redis":

‎dotnet/samples/Demos/VectorStoreRAG/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The sample can be configured in various ways:
99

1010
1. You can choose your preferred vector store by setting the `Rag:VectorStoreType` configuration setting in the `appsettings.json` file to one of the following values:
1111
1. AzureAISearch
12-
1. CosmosMongoDB
12+
1. AzureDocumentDB
1313
1. CosmosNoSql
1414
1. InMemory
1515
1. Qdrant
@@ -110,14 +110,14 @@ dotnet user-secrets set "VectorStores:AzureAISearch:Endpoint" "https://<yourserv
110110
dotnet user-secrets set "VectorStores:AzureAISearch:ApiKey" "<yoursecret>"
111111
```
112112

113-
### Azure CosmosDB MongoDB
113+
### Azure DocumentDB
114114

115-
If you want to use Azure CosmosDB MongoDB as your vector store, you will need to create an instance of Azure CosmosDB MongoDB and add
115+
If you want to use Azure DocumentDB as your vector store, you will need to create an Azure DocumentDB instance and add
116116
the following secrets here:
117117

118118
```cli
119-
dotnet user-secrets set "VectorStores:CosmosMongoDB:ConnectionString" "<yourconnectionstring>"
120-
dotnet user-secrets set "VectorStores:CosmosMongoDB:DatabaseName" "<yourdbname>"
119+
dotnet user-secrets set "VectorStores:AzureDocumentDB:ConnectionString" "<yourconnectionstring>"
120+
dotnet user-secrets set "VectorStores:AzureDocumentDB:DatabaseName" "<yourdbname>"
121121
```
122122

123123
### Azure CosmosDB NoSQL

‎dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0010</NoWarn>
9-
<!-- CommunityToolkit.VectorData.CosmosNoSql pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
9+
<!-- CommunityToolkit.VectorData.AzureCosmosDB pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
1010
<AzureCosmosDisableNewtonsoftJsonCheck>true</AzureCosmosDisableNewtonsoftJsonCheck>
1111
<UserSecretsId>c4203b00-7179-47c1-8701-ee352e381412</UserSecretsId>
1212
</PropertyGroup>
@@ -18,8 +18,8 @@
1818
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" />
1919
<PackageReference Include="PdfPig" />
2020
<PackageReference Include="CommunityToolkit.VectorData.AzureAISearch" />
21-
<PackageReference Include="CommunityToolkit.VectorData.CosmosMongoDB" />
22-
<PackageReference Include="CommunityToolkit.VectorData.CosmosNoSql" />
21+
<PackageReference Include="CommunityToolkit.VectorData.AzureDocumentDB" />
22+
<PackageReference Include="CommunityToolkit.VectorData.AzureCosmosDB" />
2323
<PackageReference Include="CommunityToolkit.VectorData.InMemory" />
2424
<PackageReference Include="CommunityToolkit.VectorData.Qdrant" />
2525
<PackageReference Include="CommunityToolkit.VectorData.Redis" />

‎dotnet/samples/Demos/VectorStoreRAG/appsettings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"Endpoint": "",
3030
"ApiKey": ""
3131
},
32-
"CosmosMongoDB": {
32+
"AzureDocumentDB": {
3333
"ConnectionString": "",
3434
"DatabaseName": ""
3535
},

‎dotnet/src/InternalUtilities/samples/InternalUtilities/TestConfiguration.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static void Initialize(IConfigurationRoot configRoot)
4848
public static MistralAIConfig MistralAI => LoadSection<MistralAIConfig>();
4949
public static GoogleAIConfig GoogleAI => LoadSection<GoogleAIConfig>();
5050
public static VertexAIConfig VertexAI => LoadSection<VertexAIConfig>();
51-
public static CosmosMongoConfig CosmosMongo => LoadSection<CosmosMongoConfig>();
51+
public static AzureDocumentDbConfig AzureDocumentDb => LoadSection<AzureDocumentDbConfig>();
5252
public static ApplicationInsightsConfig ApplicationInsights => LoadSection<ApplicationInsightsConfig>();
5353
public static CrewAIConfig CrewAI => LoadSection<CrewAIConfig>();
5454
public static BedrockConfig Bedrock => LoadSection<BedrockConfig>();
@@ -278,7 +278,7 @@ public class OllamaConfig
278278
public string Endpoint { get; set; } = "http://localhost:11434";
279279
}
280280

281-
public class CosmosMongoConfig
281+
public class AzureDocumentDbConfig
282282
{
283283
public string ConnectionString { get; set; }
284284
public string DatabaseName { get; set; }

0 commit comments

Comments
 (0)