Show HN: GPT-JSON, get structured response from OpenAI's API in Node.js (npmjs.com) 3 points by lkiss 3y ago ↗ HN
[–] PUSH_AX 3y ago ↗ Is this just an abstraction over open AI function calling and ‘JSON.parse’ the arguments field from the response? [–] lkiss 3y ago ↗ Yes and no. It is indeed a thin layer but does much more than a simple JSON.parse. For example, it allows you to stream structured data too. If you want to receive an array, it will call your callback with every new item of that array. [–] PUSH_AX 3y ago ↗ That's pretty neat, I didn't realise function calls also streamed.
[–] lkiss 3y ago ↗ Yes and no. It is indeed a thin layer but does much more than a simple JSON.parse. For example, it allows you to stream structured data too. If you want to receive an array, it will call your callback with every new item of that array. [–] PUSH_AX 3y ago ↗ That's pretty neat, I didn't realise function calls also streamed.
4 comments
[ 3.8 ms ] story [ 29.5 ms ] thread