Sets the output schema.
Description
When setting an output schema, this method automatically sets the output MIME type to “application/json” if not already set.
Parameters
- mixed> $outputSchema The output schema (JSON schema).
Source
public function setOutputSchema(array $outputSchema): void
{
$this->outputSchema = $outputSchema;
// Automatically set outputMimeType to application/json when schema is provided
if ($this->outputMimeType === null) {
$this->outputMimeType = 'application/json';
}
}
Changelog
| Version | Description |
|---|---|
| 0.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.