mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Switch to SqlVector<float> for embeddings
Updated the application to use SQL Server's native vector data type (`SqlVector<float>`) for embeddings, replacing the previous `float[]` or `string` representations. - Updated `.editorconfig` with new code style preferences and diagnostic rule severities. - Modified `DocumentChunk.cs` to use `SqlVector<float>` for the `Embedding` property. - Updated migrations and `ApplicationDbContextModelSnapshot` to reflect the new `SqlVector<float>` type. - Replaced `AddAzureSql` with `AddSqlServer` in `Program.cs` and removed `UseVectorSearch`. - Adjusted `DocumentService` and `VectorSearchService` to handle `SqlVector<float>` and updated vector search logic. - Removed the `EFCore.SqlServer.VectorSearch` package and upgraded EF Core to `10.0.0-rc.1`. - Made minor adjustments to OpenAPI configuration and dependency management.
This commit is contained in:
+5
-1
@@ -82,6 +82,7 @@ csharp_style_prefer_local_over_anonymous_function = true:silent
|
||||
csharp_style_prefer_extended_property_pattern = true:suggestion
|
||||
csharp_style_implicit_object_creation_when_type_is_apparent = true:silent
|
||||
csharp_style_prefer_tuple_swap = true:silent
|
||||
csharp_style_prefer_simple_property_accessors = true:suggestion
|
||||
|
||||
# Field preferences
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
@@ -299,4 +300,7 @@ dotnet_diagnostic.IDE0010.severity = none
|
||||
dotnet_diagnostic.IDE0072.severity = none
|
||||
|
||||
# IDE0305: Simplify collection initialization
|
||||
dotnet_diagnostic.IDE0305.severity = none
|
||||
dotnet_diagnostic.IDE0305.severity = none
|
||||
|
||||
# CA1873: Avoid potentially expensive logging
|
||||
dotnet_diagnostic.CA1873.severity = none
|
||||
Reference in New Issue
Block a user