Commit f2de636
committed
fix: prevent exception chunk from being passed to _process in astream
Pop exception from chunks list (like we do for the None sentinel) so
_process doesn't receive it. Guard chat_response access in ollama
post_processing with .get() for when no valid chunks arrived.
Signed-off-by: 0xCUB3 <skula@mit.edu>1 parent 6f3e131 commit f2de636
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | | - | |
| 328 | + | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| |||
0 commit comments