Skip to main content
This example demonstrates async structured output streaming from a team using Pydantic models to ensure structured responses while streaming, providing both real-time output and validated data structures asynchronously.

Code

cookbook/examples/teams/structured_input_output/05_async_structured_output_streaming.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Install required libraries

3

Set environment variables

4

Run the agent