Open alkampfergit opened 1 week ago
Error seems to be related to this line
var citations = ((JsonElement)toolCall.Arguments["documents"]).EnumerateArray().Select(e => e.GetInt32() - 1).ToHashSet();
Probably when there is no any citations the arguments passed to documents it is not an empty array, but has a type number, do not know why it happens, but to replicate it is possible to ask several time for question that cannot be answered by the memory.
It seems that we had some error in the enumerateArray, probably the api did not respond something useful, but the problem is that we have a generic error and absolutely no clue on what really happened.