kernel-memory
kernel-memory copied to clipboard
[Bug] Unable to get details while using multiple `ImportDocumentAsync`
Context / Scenario
I am using latest ollama connector and qdrant db with llama3.2:latest. Below is the code snippet -
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.KernelMemory;
using Microsoft.KernelMemory.AI.Ollama;
var config = new OllamaConfig
{
Endpoint = "http://localhost:11434",
TextModel = new OllamaModelConfig("llama3.2:latest"),
EmbeddingModel = new OllamaModelConfig("nomic-embed-text", 2048)
};
var memory = new KernelMemoryBuilder()
.Configure(builder => builder.Services.AddLogging(l =>
{
l.SetMinimumLevel(LogLevel.Warning);
l.AddSimpleConsole(c => c.SingleLine = true);
}))
.WithOllamaTextGeneration(config)
.WithOllamaTextEmbeddingGeneration(config)
.WithQdrantMemoryDb("http://localhost:6333/")
.Build<MemoryServerless>();
var listofDocIds = new List<string>
{
await memory.ImportDocumentAsync(@"CVE-2021-27293.json", "CVE-2021-27293"),
await memory.ImportDocumentAsync(@"CVE-2024-45302.json", "CVE-2024-45302"),
};
Console.WriteLine(await memory.IsDocumentReadyAsync("CVE-2021-27293"));
Console.WriteLine(await memory.IsDocumentReadyAsync("CVE-2024-45302"));
var answer = await memory.AskAsync("what you know about CVE-2021-27293 ?");
Console.WriteLine(answer.Result);
Console.WriteLine(Environment.NewLine);
Console.WriteLine(Environment.NewLine);
answer = await memory.AskAsync("what you know about CVE-2024-45302 ?");
Console.WriteLine(answer.Result);
Console.WriteLine(Environment.NewLine);
Console.WriteLine(Environment.NewLine);
While using any of the document it works well, however while using multiple ImportDocumentAsync it does not work.
You may find the files here - CVE-2024-45302.json
What happened?
Seems like db has valid data, here is the sc -
However, while asking the question it shows INFO NOT FOUND for CVE-2021-27293
Importance
I cannot use Kernel Memory
Platform, Language, Versions
.NET 8 Microsoft.KernelMemory.AI.Ollama : 0.78.241005.1 Microsoft.KernelMemory.Core : 0.78.241005.1
Relevant log output
warn: Microsoft.KernelMemory.AI.Ollama.OllamaTextEmbeddingGenerator[0] Tokenizer not specified, will use GPT4oTokenizer. The token count might be incorrect, causing unexpected errors
warn: Microsoft.KernelMemory.AI.Ollama.OllamaTextGenerator[0] Tokenizer not specified, will use GPT4oTokenizer. The token count might be incorrect, causing unexpected errors
warn: Microsoft.KernelMemory.AI.Ollama.OllamaTextEmbeddingGenerator[0] Tokenizer not specified, will use GPT4oTokenizer. The token count might be incorrect, causing unexpected errors
True
True
what you know about CVE-2021-27293 ?
INFO NOT FOUND.
what you know about CVE-2024-45302 ?
Based on the provided information, here is what I know about CVE-2024-45302:
1. **CVE-2024-45302** is a publicly disclosed security vulnerability.
2. It has been assigned to by GitHub (assignerOrgId: "a0819718-46f1-4df5-94e2-005712e83aaa") and was published on August 29, 2024.
3. The vulnerability is related to CRLF injection in the `RestSharp` library, specifically in the `AddHeader` method.
4. It has a CVSS (Common Vulnerability Scoring System) score of 6.1, which indicates a medium severity level.
5. The affected versions of `RestSharp` are those that are greater than or equal to version 107 but less than version 112.0.0.
6. The vulnerability was discovered and disclosed by GitHub, and the provider metadata (organization ID, short name) is associated with this CVE.
This information is based on the provided metadata and does not imply any further details about the vulnerability's impact, exploitability, or fixes.