Skip to main content
Use PIIDetectionGuardrail to block PII before a Team run reaches its model. A blocked call returns a run with RunStatus.error; the guardrail exception is handled inside the run.
1

Create a Python file

pii_detection.py
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

5

Run Team