Enhanced app with Azure AI and vector search

- Modified `ApplicationDbContext.cs` to correct the `.IsVector()` method placement for `DocumentChunk`.
- Removed `MemoryResponse.cs` class, indicating a move away from this model.
- Enhanced `Program.cs` with Azure AI services integration for text embeddings and chat completions. Updated OpenAPI descriptions and reintroduced `/api/ask` with vector search.
- Adjusted `ChatService.cs` to improve question-asking functionality using document chunks.
- Updated `VectorSearchService.cs` with a new `AskQuestionAsync` method for advanced search and response capabilities. Made `GetContentAsync` static.
- Formatted `SqlDatabaseVectorSearch.csproj` and managed NuGet package inclusions.
- Simplified `appsettings.json` by removing unused keys.
- Added a new `Response` record class for standardized service responses.
This commit is contained in:
Marco Minerva
2024-06-14 12:59:09 +02:00
parent 9284ae5377
commit db4646330f
8 changed files with 82 additions and 60 deletions
@@ -4,15 +4,15 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0050;</NoWarn>
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0010;SKEXP0050;</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EFCore.SqlServer.VectorSearch" Version="0.1.1" />
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.2" />
<PackageReference Include="EFCore.SqlServer.VectorSearch" Version="0.1.1" />
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.14.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.14.1" />
<PackageReference Include="MinimalHelpers.OpenApi" Version="2.0.8" />
<PackageReference Include="PdfPig" Version="0.1.8" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />