Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Incremental JSON parser for streaming LLM tool calls in Ruby (aha.io)
13 points by hotk 3 months ago | hide | past | favorite
Built this for streaming AI tool calls. LLMs stream function arguments as JSON character-by-character. Most parsers reparse from scratch each time - O(n²) behavior that causes UI lag.

This maintains parsing state, processing only new characters. True O(n) performance that stays imperceptible throughout the entire response.

Ruby gem, MIT licensed. Would love feedback.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: