Skip to main content

Overview

This example validates the structured-output validation-loop workflow described in the InstructorPHP article. It uses InstructorPHP only. It runs a deterministic invalid-then-corrected response through the real StructuredOutput pipeline, captures validation and retry events, and then runs the same response model against OpenAI when an API key is available.

Example