<?php
namespace App\AI\Api\ChatGpt\Responses; class Parameters extends \stdClass { public $type = "object"; public $properties; public $required = []; public $additionalProperties = false; public function __construct() { $this->properties = new \App\AI\Api\ChatGpt\Responses\Properties(); } public function addProperty(string $propertyName, \App\AI\Api\ChatGpt\Responses\Property $propertyStdObj): void { if (is_null($propertyStdObj->type)) { unset($propertyStdObj->type); } if (is_null($propertyStdObj->enum)) { unset($propertyStdObj->enum); } if (is_null($propertyStdObj->items)) { unset($propertyStdObj->items); } if (is_null($propertyStdObj->description)) { unset($propertyStdObj->description); } if (is_null($propertyStdObj->format)) { unset($propertyStdObj->format); } if (is_null($propertyStdObj->pattern)) { unset($propertyStdObj->pattern); } if (is_null($propertyStdObj->minimum)) { unset($propertyStdObj->minimum); } if (is_null($propertyStdObj->maximum)) { unset($propertyStdObj->maximum); } if (is_null($propertyStdObj->properties) || empty(get_object_vars($propertyStdObj->properties))) { unset($propertyStdObj->properties); } $this->properties->{$propertyName} = $propertyStdObj; } public function setRequired(array $required): void { $this->required = $required; } } 