StructuredOutput
A finite scalar-object format request; it declares shape, never expected values or truth.
StructuredOutput::__construct()
public function __construct(string $name, array $fields):All named fields are required; nested schemas, constants and extra fields are unsupported.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $fields | array<string, mixed> | Raw scalar-type declarations, validated here (at most 64 fields). |
StructuredOutput::toArray()
public function toArray(): arrayThe explicit OpenAI-compatible wire format, with no prompt or answer values.