top | item 45570635 (no title) holdenc137 | 4 months ago I don't get it (and I'd call this cumulative not incremental)Why not at least wait until the key is complete - what's the use in a partial key? discuss order hn newest xg15|4 months ago Doesn't it do exactly that?> As a consequence of 1 and 5, we only add a property to an object once we have the entire key and enough of the value to know that value's type. 0x6c6f6c|4 months ago Their example in the README is extremely misleading then. It indicates your stream output isname: A name: Al name: Ale name: AlexWhich would suggest you are getting unfinished strings out in the stream. load replies (2) rictic|4 months ago Cumulative is a good term too. I come from the browser world where it's typically called incremental parsing, e.g. when web browsers parse and render HTML as it streams in over the wire. I was doing the same thing with JSON from LLMs. simonw|4 months ago If you're building a UI that renders output from a streaming LLM you might get back something which looks like this: {"role": "assistant", "text": "Here's that Python code you aske Incomplete parsing with incomplete strings is still useful in order to render that to your end user while it's still streaming in. trevor-e|4 months ago In this example the value is incomplete, not the key. cozzyd|4 months ago incomplete strings could be fun in certain cases{"cleanup_cmd":"rm -rf /home/foo/.tmp" } load replies (4)
xg15|4 months ago Doesn't it do exactly that?> As a consequence of 1 and 5, we only add a property to an object once we have the entire key and enough of the value to know that value's type. 0x6c6f6c|4 months ago Their example in the README is extremely misleading then. It indicates your stream output isname: A name: Al name: Ale name: AlexWhich would suggest you are getting unfinished strings out in the stream. load replies (2)
0x6c6f6c|4 months ago Their example in the README is extremely misleading then. It indicates your stream output isname: A name: Al name: Ale name: AlexWhich would suggest you are getting unfinished strings out in the stream. load replies (2)
rictic|4 months ago Cumulative is a good term too. I come from the browser world where it's typically called incremental parsing, e.g. when web browsers parse and render HTML as it streams in over the wire. I was doing the same thing with JSON from LLMs.
simonw|4 months ago If you're building a UI that renders output from a streaming LLM you might get back something which looks like this: {"role": "assistant", "text": "Here's that Python code you aske Incomplete parsing with incomplete strings is still useful in order to render that to your end user while it's still streaming in. trevor-e|4 months ago In this example the value is incomplete, not the key. cozzyd|4 months ago incomplete strings could be fun in certain cases{"cleanup_cmd":"rm -rf /home/foo/.tmp" } load replies (4)
cozzyd|4 months ago incomplete strings could be fun in certain cases{"cleanup_cmd":"rm -rf /home/foo/.tmp" } load replies (4)
xg15|4 months ago
> As a consequence of 1 and 5, we only add a property to an object once we have the entire key and enough of the value to know that value's type.
0x6c6f6c|4 months ago
name: A name: Al name: Ale name: Alex
Which would suggest you are getting unfinished strings out in the stream.
rictic|4 months ago
simonw|4 months ago
trevor-e|4 months ago
cozzyd|4 months ago
{"cleanup_cmd":"rm -rf /home/foo/.tmp" }