Skip to main content
This example demonstrates how to use strict tool validation with structured outputs. Strict tool use ensures that tool parameters strictly follow the input schema, providing additional validation when using tools alongside structured outputs.

Code

structured_output_strict_tools.py

Usage

1

Set up your virtual environment

2

Set your API key

3

Install dependencies

4

Run Agent