Feat: Handle unicode error, fix OTel error capturing (#1959)

* feat: raise illegal task output error out of the runner if we get a null unicode escape sequence

* feat: add helper for sanitizing outputs

* feat: improve error

* fix: lock index

* feat: use async stream method in example

* chore: ver

* chore: changelog

* fix: turns out we don't need to lock

* fix: return exception for instrumentation

* chore: changelog

* chore: bunch of generated crap

* fix: comment placement

* fix: copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Matt Kaye
2025-07-09 14:18:41 -04:00
committed by GitHub
parent 7c84c7f664
commit 2cfb345dcf
16 changed files with 221 additions and 236 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ async def stream_task(input: EmptyModel, ctx: Context) -> None:
await asyncio.sleep(2)
for chunk in chunks:
ctx.put_stream(chunk)
await ctx.aio_put_stream(chunk)
await asyncio.sleep(0.20)