mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-09-20 10:03:37 +00:00
* docs(streaming): fix streaming output docstring examples CrewStreamingOutput's example called crew.kickoff() without setting stream=True on the Crew, so the snippet returned a CrewOutput and did not stream anything. FlowStreamingOutput's example called flow.kickoff_streaming() and flow.kickoff_streaming_async(); neither method exists. Flow-level streaming is exposed through Flow.kickoff with stream=True and returns a StreamSession, not a FlowStreamingOutput. Refs #7285 * docs(streaming): clarify Flow.kickoff does not take stream param Flow.kickoff() has no stream parameter; the runtime returns a StreamSession when self.stream is True. Reword the FlowStreamingOutput note so callers know to configure the Flow with stream=True before calling kickoff(). Addresses CodeRabbit review on #7286. * docs(streaming): restore FlowStreamingOutput example Add back an Example block showing valid usage of FlowStreamingOutput. The class is only ever constructed directly with a chunk-producing iterator (see lib/crewai/tests/test_streaming.py), so the example mirrors that pattern instead of the original snippet that referenced non-existent Flow.kickoff_streaming methods. Addresses review feedback on #7286. * docs(streaming): swap FlowStreamingOutput example for public Flow streaming path Replace the test-only FlowStreamingOutput(sync_iterator=...) example with the actual public flow-streaming path: Flow.stream=True followed by kickoff() / kickoff_async(), which return StreamSession / AsyncStreamSession. The example is labeled explicitly to make clear that Flow.kickoff() does not return a FlowStreamingOutput, and points readers at the streaming-flow-execution guide. Addresses review feedback on #7286. --------- Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>