Skip to main content

Overview

Instructor PHP provides a way to debug HTTP calls made to LLM APIs by using an HTTP client configured with withDebugConfig(DebugConfig::fromPreset(...)) and passing it into InferenceRuntime. When HTTP debug mode is enabled, the HTTP middleware stack prints request and response details (including streaming data) to the console and dispatches HTTP debug events.

Example