Update VectorSearchService and package reference

- Removed `System.Threading` directive from `VectorSearchService.cs`
- Updated `BeginTransactionAsync` call to include `cancellationToken`
- Upgraded `Microsoft.SemanticKernel` package to version `1.36.1`
This commit is contained in:
Marco Minerva
2025-02-10 16:22:03 +01:00
parent a0f1755c85
commit a5f8425e61
2 changed files with 2 additions and 3 deletions
@@ -1,6 +1,5 @@
using System.Data; using System.Data;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Threading;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Microsoft.SemanticKernel.Embeddings; using Microsoft.SemanticKernel.Embeddings;
@@ -28,7 +27,7 @@ public class VectorSearchService(IServiceProvider serviceProvider, ApplicationDb
var strategy = dbContext.Database.CreateExecutionStrategy(); var strategy = dbContext.Database.CreateExecutionStrategy();
var document = await strategy.ExecuteAsync(async (cancellationToken) => var document = await strategy.ExecuteAsync(async (cancellationToken) =>
{ {
await dbContext.Database.BeginTransactionAsync(); await dbContext.Database.BeginTransactionAsync(cancellationToken);
if (documentId.HasValue) if (documentId.HasValue)
{ {
@@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.1" /> <PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.1" />
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.1" /> <PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.1" />
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.1" /> <PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.1" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.36.0" /> <PackageReference Include="Microsoft.SemanticKernel" Version="1.36.1" />
<PackageReference Include="MinimalHelpers.OpenApi" Version="2.1.3" /> <PackageReference Include="MinimalHelpers.OpenApi" Version="2.1.3" />
<PackageReference Include="PdfPig" Version="0.1.9" /> <PackageReference Include="PdfPig" Version="0.1.9" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />