question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The data type of the `Id` member in the `ScoredPoint` class may need to be changed to `int`.

See original GitHub issue

Describe the bug The data type of the Id member in the ScoredPoint class may need to be changed to int.

https://github.com/microsoft/semantic-kernel/blob/562ab5bc63ec4043fe6c797145e326934ce61639/dotnet/src/Connectors/Connectors.Memory.Qdrant/Http/ApiSchema/SearchVectorsResponse.cs#L14

To Reproduce


    public async Task qdrant_SK_Http_HNSW_index_Cosine_50_ProcessAsync()
    {
        QdrantMemoryStore memoryStore =
                new QdrantMemoryStore
                            (
                                GlobalManager.SelfHostQdrantHttpConnectionString
                                , 6333
                                , vectorSize: 4
                                //, ConsoleLogger.Log
                            );
        IKernel kernel = Kernel.Builder
            //.WithLogger(ConsoleLogger.Log)
            .Configure
            (
                c =>
                {
                    c.AddOpenAITextCompletionService("text-davinci-003", "123");
                    c.AddOpenAITextEmbeddingGenerationService("text-embedding-ada-002", "123");
                }
            )
            .WithMemoryStorage(memoryStore)
            .Build();

        var MemoryCollectionName = "small";
       //bug here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        var searchResults = kernel
                                .Memory
                                .SearchAsync
                                        (
                                            MemoryCollectionName
                                            , "My favorite color is orange"
                                            , limit: 20
                                            , minRelevanceScore: 0.8
                                            , withEmbeddings: true
                                        );

        await foreach (var item in searchResults)
        {
            //Console.WriteLine(item.Metadata.Text + " : " + item.Relevance);
            _ = item.Relevance;
        }
    }

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem. image

image

Desktop (please complete the following information):

  • OS: [e.g. Windows]
  • IDE: [e.g. Visual Studio, VS Code]
  • NuGet Package Version [e.g. 0.1.0]

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
craigomaticcommented, May 5, 2023

Another simple option we can consider:

[JsonPropertyName("id")]
[JsonNumberHandling(JsonNumberHandling.WriteAsString)]
public string Id { get; }

https://learn.microsoft.com/en-us/dotnet/api/system.text.json.serialization.jsonnumberhandlingattribute

1reaction
AwesomeYuercommented, May 5, 2023

good

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved IN JAVA Write a class named Thing that has only
IN JAVA Write a class named Thing that has only an Integer id as data, and includes only: the specifying constructor, an accessor,...
Read more >
Qdrant & Text Data
This tutorial will show you how to use Qdrant to develop a semantic search service. At its core, this service will harness Natural...
Read more >
Trey CMPS 260 Final Flashcards
Assume the class Event is implemented and imported correctly.Assume the OnceUpon reference variable story has been initialized in main using the default ...
Read more >
Points
A point is a record consisting of a vector and an optional payload. You can search among the points grouped in one collection...
Read more >
Chap 7 MPL (P2) Flashcards
A data member score of type int. A member function called setName that accepts a parameter and assigns it to name. The function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found