Skip to content

Commit 5e2a32f

Browse files
Bump the dotnet group in /docs/ai/quickstarts/snippets/chat-with-data/azure-openai with 3 updates (#45311)
* Bump the dotnet group Bumps the dotnet group in /docs/ai/quickstarts/snippets/chat-with-data/azure-openai with 3 updates: [Microsoft.Extensions.Configuration](https://github.com/dotnet/runtime), [Microsoft.Extensions.Configuration.UserSecrets](https://github.com/dotnet/runtime) and [Microsoft.Extensions.VectorData.Abstractions](https://github.com/microsoft/semantic-kernel). Updates `Microsoft.Extensions.Configuration` from 9.0.2 to 9.0.3 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v9.0.2...v9.0.3) Updates `Microsoft.Extensions.Configuration` from 9.0.2 to 9.0.3 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v9.0.2...v9.0.3) Updates `Microsoft.Extensions.Configuration.UserSecrets` from 9.0.2 to 9.0.3 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v9.0.2...v9.0.3) Updates `Microsoft.Extensions.VectorData.Abstractions` from 9.0.0-preview.1.25078.1 to 9.0.0-preview.1.25161.1 - [Release notes](https://github.com/microsoft/semantic-kernel/releases) - [Commits](microsoft/semantic-kernel@vectordata-dotnet-9.0.0-preview.1.25078.1...vectordata-dotnet-9.0.0-preview.1.25161.1) --- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration.UserSecrets dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.VectorData.Abstractions dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] <[email protected]> * fix build errors --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Genevieve Warren <[email protected]>
1 parent 1fac792 commit 5e2a32f

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

docs/ai/quickstarts/snippets/chat-with-data/azure-openai/CloudService.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
using Microsoft.Extensions.VectorData;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Text;
6-
using System.Threading.Tasks;
72

83
namespace VectorDataAI
94
{

docs/ai/quickstarts/snippets/chat-with-data/azure-openai/Program.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using Azure.AI.OpenAI;
22
using Azure.Identity;
33
using Microsoft.Extensions.AI;
4-
using Microsoft.Extensions.VectorData;
54
using Microsoft.Extensions.Configuration;
5+
using Microsoft.Extensions.VectorData;
66
using Microsoft.SemanticKernel.Connectors.InMemory;
77
using VectorDataAI;
88

@@ -60,26 +60,26 @@
6060

6161
// Create and populate the vector store
6262
var vectorStore = new InMemoryVectorStore();
63-
var cloudServicesStore = vectorStore.GetCollection<int, CloudService>("cloudServices");
63+
Microsoft.Extensions.VectorData.IVectorStoreRecordCollection<int, CloudService> cloudServicesStore = vectorStore.GetCollection<int, CloudService>("cloudServices");
6464
await cloudServicesStore.CreateCollectionIfNotExistsAsync();
6565

66-
foreach (var service in cloudServices)
66+
foreach (CloudService service in cloudServices)
6767
{
6868
service.Vector = await generator.GenerateEmbeddingVectorAsync(service.Description);
6969
await cloudServicesStore.UpsertAsync(service);
7070
}
7171

7272
// Convert a search query to a vector and search the vector store
73-
var query = "Which Azure service should I use to store my Word documents?";
74-
var queryEmbedding = await generator.GenerateEmbeddingVectorAsync(query);
73+
string query = "Which Azure service should I use to store my Word documents?";
74+
ReadOnlyMemory<float> queryEmbedding = await generator.GenerateEmbeddingVectorAsync(query);
7575

76-
var results = await cloudServicesStore.VectorizedSearchAsync(queryEmbedding, new VectorSearchOptions()
76+
VectorSearchResults<CloudService> results =
77+
await cloudServicesStore.VectorizedSearchAsync(queryEmbedding, new VectorSearchOptions<CloudService>()
7778
{
78-
Top = 1,
79-
VectorPropertyName = "Vector"
79+
Top = 1
8080
});
8181

82-
await foreach (var result in results.Results)
82+
await foreach (VectorSearchResult<CloudService> result in results.Results)
8383
{
8484
Console.WriteLine($"Name: {result.Record.Name}");
8585
Console.WriteLine($"Description: {result.Record.Description}");

docs/ai/quickstarts/snippets/chat-with-data/azure-openai/VectorDataAI.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
<ItemGroup>
1111
<PackageReference Include="Azure.Identity" Version="1.13.2" />
1212
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
13-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.0.1-preview.1.24570.5" />
14-
<PackageReference Include="Microsoft.Extensions.VectorData.Abstractions" Version="9.0.0-preview.1.25078.1" />
15-
<PackageReference Include="Microsoft.SemanticKernel.Connectors.InMemory" Version="1.31.0-preview" />
16-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.2" />
17-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.2" />
13+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
14+
<PackageReference Include="Microsoft.Extensions.VectorData.Abstractions" Version="9.0.0-preview.1.25161.1" />
15+
<PackageReference Include="Microsoft.SemanticKernel.Connectors.InMemory" Version="1.41.0-preview" />
16+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-preview.1.25080.5" />
17+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.0-preview.1.25080.5" />
1818
</ItemGroup>
1919

2020
</Project>

0 commit comments

Comments
 (0)