Commit feb8cf9
fix(bedrock): stream events incrementally instead of buffering (#1989)
Fixes #1986
`_run_converse_stream` used `list()` to collect all stream events before
returning. This blocked the caller until the full response was ready.
Replaced with an `asyncio.Queue` bridge so events are forwarded as they
arrive from boto3.
Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
Co-authored-by: J.M. Huibonhoa <jmhbh@users.noreply.github.com>1 parent 32e7221 commit feb8cf9
1 file changed
Lines changed: 17 additions & 6 deletions
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | 321 | | |
326 | 322 | | |
327 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
328 | 337 | | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
332 | 341 | | |
333 | 342 | | |
334 | 343 | | |
335 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
336 | 347 | | |
337 | 348 | | |
338 | 349 | | |
| |||
0 commit comments