output_schema to a specific agent run, allowing you to get structured output without setting a default schema on the agent.
1
Add the following code to your Python file
output_schema_on_run.py
2
Create a virtual environment
Open the
Terminal and create a python virtual environment.3
Install libraries
4
Export your OpenAI API key
5
Run the example