partial-json-parser-js
partial-json-parser-js copied to clipboard
Parse partial JSON generated by LLM
Not sure if relevant for the general library here, but sending this PR in case you find it useful (it was needed for our specific use case). These changes intend...
I did some fuzz testing with this library and found an edge case. The JSON string `"{\"__proto__\": 0}"` is correctly parsed by the native JSON library into `{ "__proto__": 0...
sometimes openai returns \`\`\`json { "key": "value" } \`\`\` does this lib handles this use case ?
Fixes #12 by properly distinguishing between malformed JSON (invalid syntax) and partial JSON (incomplete but valid syntax). ## Problem The parser was silently swallowing invalid JSON syntax instead of throwing...
``` "text-embedding-3-small": { "vector": [1.4564884488666646, 2, 3, 4, 5, .0516156161551515, 7], "info": "PROMPT \"representation\" MODEL \"text-embedding-3-small\"" } ``` results in ``` "text-embedding-3-small": { "vector": [1.4564884488666646, 2, 3, 4, 5] }...
Hi First, thank you for this great library β itβs very helpful. Iβd like to suggest an enhancement based on common challenges when working with AI models, especially LLMs that...