-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Unhandled exception. System.Text.Json.JsonException: '0x00' is an invalid start of a value #920
Comments
hi @biapar could you share how you instantiate the |
if (!StorageExists)
.... static IKernelMemory CreateMemory(string modelPath)
|
Context / Scenario
I use LLAMASharp + KernelMemory with PDF analysis. I try with a long PDF. When I query the model, I've this error.
I import the docs with:
What happened?
After a prompt:
Error on JSON Read:
(String[] args)Unhandled exception. System.Text.Json.JsonException: '0x00' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: '0x00' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan
1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo
1.Deserialize(Utf8JsonReader& reader, ReadStack& state)at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 utf8Json, JsonTypeInfo
1 jsonTypeInfo, Nullable1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 json, JsonTypeInfo1 jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at Microsoft.KernelMemory.MemoryStorage.DevTools.SimpleVectorDb.GetListAsync(String index, ICollection
1 filters, Int32 limit, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()at Microsoft.KernelMemory.MemoryStorage.DevTools.SimpleVectorDb.GetListAsync(String index, ICollection
1 filters, Int32 limit, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult() at Microsoft.KernelMemory.MemoryStorage.DevTools.SimpleVectorDb.GetSimilarListAsync(String index, String text, ICollection
1 filters, Double minRelevance, Int32 limit, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()at Microsoft.KernelMemory.MemoryStorage.DevTools.SimpleVectorDb.GetSimilarListAsync(String index, String text, ICollection
1 filters, Double minRelevance, Int32 limit, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext() at Microsoft.KernelMemory.MemoryStorage.DevTools.SimpleVectorDb.GetSimilarListAsync(String index, String text, ICollection
1 filters, Double minRelevance, Int32 limit, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()at Microsoft.KernelMemory.Search.SearchClient.AskAsync(String index, String question, ICollection
1 filters, Double minRelevance, IContext context, CancellationToken cancellationToken) at Microsoft.KernelMemory.Search.SearchClient.AskAsync(String index, String question, ICollection
1 filters, Double minRelevance, IContext context, CancellationToken cancellationToken)at Program.ShowAnswer(IKernelMemory memory, String question) in /Users/biagioparuolo/ProjectsOnMac/_BWare360Projects/LLMSharp/LLMSharpDemo/LLMSharpDemo/Program.cs:line 145
at Program.StartUserChatSession(IKernelMemory memory) in /Users/biagioparuolo/ProjectsOnMac/_BWare360Projects/LLMSharp/LLMSharpDemo/LLMSharpDemo/Program.cs:line 251
at Program.Main(String[] args) in /Users/biagioparuolo/ProjectsOnMac/_BWare360Projects/LLMSharp/LLMSharpDemo/LLMSharpDemo/Program.cs:line 132
at Program.
[1] 11122 abort
Importance
edge case
Platform, Language, Versions
LLAMASharp last ver
Kernel Memory last ver
.NET Core 8
MacOS
Relevant log output
The text was updated successfully, but these errors were encountered: