[分享创造] 分享一个基于 JSON 片段流的增量解析器(Go) December 31, 2025 · user 最近在 LLM Stream 场景下踩了个坑: 模型输出的是 JSON ,但要等完整闭合才能处理,前端体验很差。 就试着写了个基于 JSON 片段流的增量解析器,可以在对象还没完全生成完时就触发回调处理。 顺手开源了一下,记录一次工程实践。 https://github.com/codeforgee/streamShare this: Click to share on Facebook (Opens in new window) Facebook Click to share on X (Opens in new window) X Comments Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. {{#message}}{{{message}}}{{/message}}{{^message}}Your submission failed. The server responded with {{status_text}} (code {{status_code}}). Please contact the developer of this form processor to improve this message. Learn More{{/message}}{{#message}}{{{message}}}{{/message}}{{^message}}It appears your submission was successful. Even though the server responded OK, it is possible the submission was not processed. Please contact the developer of this form processor to improve this message. Learn More{{/message}}Submitting…
Leave a Reply Cancel reply