Code
cookbook/11_models/ibm/watsonx/structured_output.py
Usage
1
Set up your virtual environment
2
Set your API key
3
Install dependencies
4
Run Agent
MovieScript with various fields and their descriptions, then creates an agent using this model as the output_schema. The model’s output will be parsed into this structured format.