You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1cd09c1
Browse filesBrowse the repository at this point in the historyBrowse files
Summary: This commit applies various refactoring and formatting changes to the Qdrant DotNet code, which is a wrapper for the Qdrant vector database. The changes include:
- Breaking long lines into multiple lines for better readability and consistency
- Adding or removing blank lines and spaces where needed
- Using expression-bodied properties and constructors, null coalescing operator, string interpolation, var keyword, and discard variable where possible
- Simplifying some boolean expressions and null checks
- Renaming some variables and methods for clarity
- Adding some validation checks and error messages
- Adding missing namespace and XML documentation
- Fixing a bug in the FetchVectorsResponse class, where the Json parsing was not using the System.Text.Json library
- Fixing a bug in the DeleteCollectionAsync method, where the response status code was not checked
- Refactoring the SearchVectorBySimilarityAsync method to take a DataEntry<VectorRecordData<float>> parameter instead of a VectorRecordData<float> parameter, to be consistent with the FindClosestAsync method
- Fixing the indentation in the project file to use four spaces instead of two
Copy file name to clipboardExpand all lines: dotnet/src/SemanticKernel.Skills/Skills.Memory.VectorDB/Qdrant/DotNet/Internal/Diagnostics/ConsoleLogger.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ public static ILogger Create(string categoryName, Action<SimpleConsoleFormatterO
Copy file name to clipboardExpand all lines: dotnet/src/SemanticKernel.Skills/Skills.Memory.VectorDB/Qdrant/DotNet/Internal/Http/Specs/CreateCollectionRequest.cs
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,8 @@ public void Validate()
72
72
{
73
73
Verify.True(this.Size>0,"The vector size must be greater than zero");
74
74
Verify.NotNull(this.DistanceType,"The distance type has not been defined");
75
-
Verify.True(this.DistanceTypeisVectorDistanceType.Cosine or VectorDistanceType.DotProduct or VectorDistanceType.Euclidean or VectorDistanceType.Manhattan,
75
+
Verify.True(
76
+
this.DistanceTypeisVectorDistanceType.Cosine or VectorDistanceType.DotProduct or VectorDistanceType.Euclidean or VectorDistanceType.Manhattan,
76
77
$"Distance type {this.DistanceType:G} not supported.");
Copy file name to clipboardExpand all lines: dotnet/src/SemanticKernel.Skills/Skills.Memory.VectorDB/Qdrant/DotNet/Internal/Http/Specs/FetchVectorsRequest.cs
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ public static FetchVectorsRequest Fetch(string collectionName)
28
28
{
29
29
returnnewFetchVectorsRequest(collectionName);
30
30
}
31
+
31
32
publicvoidValidate()
32
33
{
33
34
Verify.NotNullOrEmpty(this._collectionName,"The collection name is empty");
@@ -41,8 +42,6 @@ public HttpRequestMessage Build()
Copy file name to clipboardExpand all lines: dotnet/src/SemanticKernel.Skills/Skills.Memory.VectorDB/Qdrant/DotNet/Internal/Http/Specs/FetchVectorsResponse.cs
Copy file name to clipboardExpand all lines: dotnet/src/SemanticKernel.Skills/Skills.Memory.VectorDB/Qdrant/DotNet/Internal/Http/Specs/SearchVectorsRequest.cs
Copy file name to clipboardExpand all lines: dotnet/src/SemanticKernel.Skills/Skills.Memory.VectorDB/Qdrant/DotNet/Internal/Http/Specs/SearchVectorsResponse.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,7 @@ internal VectorFound()
30
30
31
31
internalstringStatus{get;set;}
32
32
internalList<VectorFound>Vectors{get;set;}
33
+
33
34
internalSearchVectorsResponse(stringjson):this()
34
35
{
35
36
// TODO: Replace with a System.Text.Json implementation
0 commit comments