Skip to content

Commit a1d7017

Browse files
Update Microsoft.Extensions.VectorData.Abstractions to 9.5.0 (#46287)
* Update Microsoft.Extensions.VectorData.Abstractions to 9.5.0 --- updated-dependencies: - dependency-name: Microsoft.Extensions.VectorData.Abstractions dependency-version: 9.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... 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 56c79b3 commit a1d7017

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ namespace VectorDataAI;
44

55
internal class CloudService
66
{
7-
[VectorStoreRecordKey]
7+
[VectorStoreKey]
88
public int Key { get; set; }
99

10-
[VectorStoreRecordData]
10+
[VectorStoreData]
1111
public string Name { get; set; }
1212

13-
[VectorStoreRecordData]
13+
[VectorStoreData]
1414
public string Description { get; set; }
1515

16-
[VectorStoreRecordVector(Dimensions: 384, DistanceFunction = DistanceFunction.CosineSimilarity)]
16+
[VectorStoreVector(Dimensions: 384, DistanceFunction = DistanceFunction.CosineSimilarity)]
1717
public ReadOnlyMemory<float> Vector { get; set; }
1818
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
// <SnippetVectorStore>
5959
// Create and populate the vector store
6060
var vectorStore = new InMemoryVectorStore();
61-
IVectorStoreRecordCollection<int, CloudService> cloudServicesStore =
61+
VectorStoreCollection<int, CloudService> cloudServicesStore =
6262
vectorStore.GetCollection<int, CloudService>("cloudServices");
63-
await cloudServicesStore.CreateCollectionIfNotExistsAsync();
63+
await cloudServicesStore.EnsureCollectionExistsAsync();
6464

6565
foreach (CloudService service in cloudServices)
6666
{
@@ -75,7 +75,7 @@
7575
ReadOnlyMemory<float> queryEmbedding = await generator.GenerateVectorAsync(query);
7676

7777
List<VectorSearchResult<CloudService>> results =
78-
await cloudServicesStore.SearchEmbeddingAsync(queryEmbedding, top: 1).ToListAsync();
78+
await cloudServicesStore.SearchAsync(queryEmbedding, top: 1).ToListAsync();
7979

8080
foreach (VectorSearchResult<CloudService> result in results)
8181
{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<ItemGroup>
1212
<PackageReference Include="Azure.Identity" Version="1.14.0" />
1313
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
14-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.4.3-preview.1.25230.7" />
15-
<PackageReference Include="Microsoft.Extensions.VectorData.Abstractions" Version="9.0.0-preview.1.25229.1" />
16-
<PackageReference Include="Microsoft.SemanticKernel.Connectors.InMemory" Version="1.48.0-preview" />
14+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.5.0-preview.1.25265.7" />
15+
<PackageReference Include="Microsoft.Extensions.VectorData.Abstractions" Version="9.5.0" />
16+
<PackageReference Include="Microsoft.SemanticKernel.Connectors.InMemory" Version="1.53.1-preview" />
1717
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-preview.4.25258.110" />
1818
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.0-preview.4.25258.110" />
1919
<PackageReference Include="System.Linq.AsyncEnumerable" Version="10.0.0-preview.4.25258.110" />

0 commit comments

Comments
 (0)