mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-10 21:12:37 +00:00
Implements aclose() and cancel() methods on CrewStreamingOutput and FlowStreamingOutput to allow callers to abort in-flight streaming and release resources promptly (e.g. when an HTTP client disconnects). - Add aclose() async method for async streaming contexts - Add cancel() sync method for sync streaming contexts - Add is_cancelled property to check cancellation state - Update create_async_chunk_generator to support cancel events - Update create_chunk_generator to support cancel thread events - Add comprehensive tests for cancellation scenarios Closes #5312 Co-Authored-By: João <joao@crewai.com>