Updated Program.cs to replace Swagger with OpenApi and MemoryCache with HybridCache. Refactored ChatService.cs to use HybridCache asynchronously. Removed MessageLimit from AppSettings.cs and appsettings.json. Updated SqlDatabaseVectorSearch.csproj to include HybridCache package and update dependencies.
The `AppSettings` class in `AppSettings.cs` has been modified to
remove the `MessageLimit` and `MessageExpiration` properties.
Correspondingly, the `appsettings.json` file has been updated
to remove the `MessageLimit` and `MessageExpiration` settings
under the `AppSettings` section to maintain consistency.
Updated Program.cs to use HybridCache and improved Swagger setup.
Refactored ChatService to simplify chat history management.
Updated SqlDatabaseVectorSearch.csproj to target net9.0 and
updated package references.
Added EnableRetryOnFailure option to the AddSqlServer method in Program.cs. This change configures the SQL Server connection to automatically retry on failure, improving the application's resilience to transient faults.
Enhanced ApplicationDbContext configuration by adding EnableRetryOnFailure to improve resilience against transient SQL Server failures. Existing configurations for UseVectorSearch and NoTracking remain unchanged.
Adjusted the version range specification for the `Microsoft.EntityFrameworkCore.SqlServer` package in `SqlDatabaseVectorSearch.csproj` by removing the space between the version numbers and the comma. This change improves the readability and uniformity of the code without altering the functional behavior of the version constraint.
Updated Microsoft.SemanticKernel from 1.30.0 to 1.31.0.
Updated Swashbuckle.AspNetCore from 7.0.0 to 7.1.0.
Updated TinyHelpers.AspNetCore from 3.1.19 to 4.0.4.
Added TinyHelpers.AspNetCore.Swashbuckle version 4.0.5.
Updated Microsoft.SemanticKernel from 1.30.0 to 1.31.0.
Updated Swashbuckle.AspNetCore from 7.0.0 to 7.1.0.
Updated TinyHelpers.AspNetCore from 3.1.19 to 4.0.2.
Added TinyHelpers.AspNetCore.Swashbuckle version 4.0.3.
- Updated .editorconfig with new C# style preferences.
- Modified using directives in VectorSearchService.cs.
- Changed tuple element order in VectorSearchService.cs foreach loop.
- Updated SqlDatabaseVectorSearch.csproj to target .NET 9.0.
- Updated package references and removed TinyHelpers package.
Update .editorconfig, fix VectorSearchService, upgrade packages
Updated .editorconfig with new C# style preferences. Removed `TinyHelpers.Extensions` using directive and corrected variable order in `VectorSearchService.cs`. Upgraded target framework to `net9.0` and updated several package references in `SqlDatabaseVectorSearch.csproj`.
Updated README.md to include a note on Vector support in Azure SQL Database/Managed Instance (EAP) and corrected "Dimension" to "Dimensions". Adjusted prompt formatting in ChatService.cs by replacing "---" with "=====" and improved text chunk appending. Added new package reference for `Microsoft.ML.Tokenizers.Data.Cl100kBase` in SqlDatabaseVectorSearch.csproj.
Updated README.md to include a note on Vector support in Azure SQL Database and corrected "Dimension" to "Dimensions". Modified ChatService.cs to append separator "---" only once at the end of the prompt.
- Changed ChatService registration in Program.cs from scoped to singleton.
- Modified ChatHistory initialization in ChatService.cs by removing unnecessary line breaks.
- Renamed loop variable in ChatService.cs from 'result' to 'text' for better readability.
- Updated Microsoft.SemanticKernel package version from 1.26.0 to 1.27.0 in SqlDatabaseVectorSearch.csproj.
Updated Program.cs to use ConfigureAndGet method for settings,
changed ChatService to singleton, and added TokenizerService
singleton. Modified ChatService to use TokenizerService for
token counting. Updated AppSettings and AzureOpenAISettings
with new properties. Added new package references in
SqlDatabaseVectorSearch.csproj. Updated appsettings.json with
new properties. Added TokenizerService class for token counting.
Swapped the order of `IsRequired` and `HasColumnType("vector(1536)")` method calls for the `Embedding` property in the `ApplicationDbContext` class. This change improves readability and adheres to a preferred coding convention without altering functionality.
The README.md file has been updated to specify that Vectors are saved and retrieved using the `EFCore.SqlServer.VectorSearch` library with Entity Framework Core. Additionally, the note about using straight SQL has been moved to a separate section and rephrased for better clarity.
Added information on using EFCore.SqlServer.VectorSearch for vector management with Entity Framework Core. Included a link to the `sql` branch for users preferring direct SQL usage.
Refactored the codebase to replace raw SQL connections and Dapper with Entity Framework Core (EF Core). Modified `Program.cs` to configure EF Core services. Refactored `VectorSearchService` to use EF Core for all database operations. Updated project dependencies to remove Dapper and `Microsoft.Data.SqlClient`, and add EF Core packages. Added `ApplicationDbContext` for EF Core context and new `Document` and `DocumentChunk` classes for entity models.
Updated Microsoft.SemanticKernel from 1.22.0 to 1.24.1.
Updated MinimalHelpers.OpenApi from 2.0.16 to 2.0.17.
These updates may include bug fixes, performance improvements,
or new features.
Refactored code to utilize Dapper's `ExecuteAsync` and `ExecuteScalarAsync` methods, reducing boilerplate and simplifying SQL command execution. Updated `DeleteDocumentAsync` to a concise expression-bodied member. Replaced manual SQL parameter addition with anonymous objects for better readability and maintainability. Transaction handling remains unchanged to ensure consistent database operations.
Updated the following package dependencies:
- MinimalHelpers.OpenApi from 2.0.15 to 2.0.16
- Swashbuckle.AspNetCore from 6.8.1 to 6.9.0
- TinyHelpers.AspNetCore from 3.1.17 to 3.1.19
Updated the `AskQuestionAsync` method in `ChatService.cs` to include an additional example in the `ChatHistory` object. This example clarifies how the service should respond when the requested information is not available in the given context, such as responding with "This information isn't available in the given context" if a user asks "What is the capital of France?" and there is no information about France in the chat.
Removed the Microsoft.EntityFrameworkCore namespace from Program.cs.
In SqlDatabaseVectorSearch.csproj:
- Removed EntityFrameworkCore.Exceptions.SqlServer package.
- Updated Microsoft.AspNetCore.OpenApi from 8.0.8 to 8.0.10.
- Updated Microsoft.SemanticKernel from 1.21.1 to 1.22.0.
- Updated TinyHelpers from 3.1.16 to 3.1.18.
Updated README.md for clarity and additional setup instructions:
- Refined repository description to highlight native Vector type.
- Rephrased note on Vector Support feature for readability.
- Removed mention of EFCore.SqlServer.VectorSearch library.
- Added instructions for updating VECTOR column size and setting Dimension property.
Added comment in Scripts.sql to guide vector size setting in Embedding column.
Cleaned up VectorSearchService.cs by removing unused and commented-out SQL command execution code.
Updated primary key constraint names in Scripts.sql for Documents
and DocumentChunks tables. Enhanced document upload API endpoint
description in Program.cs to reflect the use of the new native
Vector type for embeddings. Added a comment in appsettings.json
to clarify the Dimensions setting in the Embedding section.
Refactored `VectorSearchService.cs` to use Dapper for DB operations, replacing raw ADO.NET commands. Updated methods for inserting, retrieving, and deleting documents and chunks. Modified vector search query to use Dapper's `QueryAsync`.
Updated `SqlDatabaseVectorSearch.csproj` to include Dapper package reference, version `2.1.35`.
Updated Program.cs to include dimensions parameter for AddAzureOpenAITextEmbeddingGeneration sourced from aiSettings.Embedding.Dimensions. Reformatted SQL command texts in VectorSearchService.cs for better readability. Introduced EmbeddingServiceSettings class in AzureOpenAISettings.cs to allow optional dimensions configuration. Updated appsettings.json to include new Dimensions property under Embedding section.
The custom stylesheet injection for Swagger UI has been removed.
Specific width constraints for checkbox inputs in the Swagger UI
have been removed from the CSS.
Updated the following package dependencies:
- Microsoft.SemanticKernel from 1.17.2 to 1.18.2
- MinimalHelpers.OpenApi from 2.0.11 to 2.0.12
- TinyHelpers from 3.1.11 to 3.1.16
- TinyHelpers.AspNetCore from 3.1.8 to 3.1.9
- Removed AddFormFile method from Swagger config in Program.cs
- Updated package versions in SqlDatabaseVectorSearch.csproj:
- Microsoft.SemanticKernel to 1.16.2
- MinimalHelpers.OpenApi to 2.0.11
- Swashbuckle.AspNetCore to 6.7.0
- TinyHelpers to 3.1.11
- TinyHelpers.AspNetCore to 3.1.8
- Removed old package references from SqlDatabaseVectorSearch.csproj