Commit 42a8288
committed
fix(client): keep final delta when a chunk sets done in one envelope
chat_stream broke out of its read loop on the first chunk carrying
done=True, before yielding that chunk's delta. A publisher that flags its
last content chunk with done (delta + done in a single envelope) had its
final text silently dropped on the Python client — while the HTTP SSE
consumer, which emits content before honoring the finish, kept it. Yield
any non-empty delta before honoring done so both consumers agree.1 parent d3c5d82 commit 42a8288
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
403 | 410 | | |
404 | 411 | | |
405 | | - | |
406 | 412 | | |
407 | 413 | | |
408 | 414 | | |
| |||
0 commit comments