Fix bug preventing Qdrant points with numeric id from being consumed#1075
Merged
lemillermicrosoft merged 2 commits intomicrosoft:mainfrom May 18, 2023
Merged
Conversation
…tion (Qdrant allows either string or int for this Id)
tawalke
approved these changes
May 18, 2023
Contributor
tawalke
left a comment
There was a problem hiding this comment.
I think this is an effective and efficient solution for this!
shawncal
pushed a commit
to johnoliver/semantic-kernel
that referenced
this pull request
May 19, 2023
…icrosoft#1075) ### Motivation and Context Qdrant supports both string and int for the id of a ScoredPoint. This minor change allows the serialiser to handle both of these scenarios while retaining string as the type for SK. Thank you to @AwesomeYuer for the heads up in microsoft#794 ### Description Added a single attribute decorating the attribute that massages ints to string and leaves string as-is.
|
glad to hear that |
5 tasks
|
when call the function "kernel.Memory.SaveInformationAsync", the ID is assigned to a GUID, Starting in .NET 6, if you apply JsonNumberHandlingAttribute to a property that's a collection of non-number values and attempt to serialize or deserialize the property, an InvalidOperationException is thrown. |
adrianwyatt
pushed a commit
that referenced
this pull request
Jun 2, 2023
### Motivation and Context This PR fixes a regression introduced in #1075 and includes unit tests to correctly validate that both string and integer property ids are supported. ### Description The changes are based on the code suggested by AwesomeYuer over in #794 - the JsonNumberHandling attribute behaved in an unexpected way and was removed.
salmon131
pushed a commit
to salmon131/semantic-kernel
that referenced
this pull request
Jun 3, 2023
…oft#1313) ### Motivation and Context This PR fixes a regression introduced in microsoft#1075 and includes unit tests to correctly validate that both string and integer property ids are supported. ### Description The changes are based on the code suggested by AwesomeYuer over in microsoft#794 - the JsonNumberHandling attribute behaved in an unexpected way and was removed.
shawncal
pushed a commit
to shawncal/semantic-kernel
that referenced
this pull request
Jul 6, 2023
…oft#1313) ### Motivation and Context This PR fixes a regression introduced in microsoft#1075 and includes unit tests to correctly validate that both string and integer property ids are supported. ### Description The changes are based on the code suggested by AwesomeYuer over in microsoft#794 - the JsonNumberHandling attribute behaved in an unexpected way and was removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Qdrant supports both string and int for the id of a ScoredPoint. This minor change allows the serialiser to handle both of these scenarios while retaining string as the type for SK.
Thank you to @AwesomeYuer for the heads up in #794
Description
Added a single attribute decorating the attribute that massages ints to string and leaves string as-is.
Contribution Checklist
dotnet format