-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I believe some models occasionally use smart quotes in their text - particularly when compressing memories. Kimi-K2 seems to be doing this regularly. These appear to be translated as straight quotes, which breaks JSON formatting. Substituting them for apostrophes would get around the issue.
In bin/lua/infra/HTTP/json.lua we replace line 554-555:
-- Replace left double quotation mark and right double quotation mark with standard quotes
str = str:gsub("\226\128\156", '"') -- left double quotation mark
str = str:gsub("\226\128\157", '"') -- right double quotation mark
With:
-- Replace left double quotation mark and right double quotation mark with standard apostrophes
str = str:gsub("\226\128\156", "'") -- left double quotation mark
str = str:gsub("\226\128\157", "'") -- right double quotation mark
Could also be a good idea to add some more entries to the CYRILIFIER, currently some missing entry errors end up as garbage characters like superscript "TM" and "B", but they won't break the JSON. I added these for now.
Mirrowel
Metadata
Metadata
Assignees
Labels
No labels