Is interrupt not supported in astream_events? #31763
Replies: 1 comment 2 replies
-
Interrupt is not supported as a built-in feature in astream_events. There’s no API or parameter to pause, stop, or cancel a stream from within LangChain itself. If you need to interrupt a stream, you have to cancel the underlying Python async task (for example, by raising asyncio.CancelledError), but this is not managed or exposed by LangChain—it's just standard Python async behavior. Resuming after interruption isn’t supported; you’d need to restart the operation from the beginning. For more details, see the relevant code and discussion here and here. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is interrupt not supported in astream_events?
Beta Was this translation helpful? Give feedback.
All reactions