<?php
namespace App\AI\Api\Gemini\Interactions; class GenerationConfig implements \JsonSerializable { public $tool_choice; public function jsonSerialize(): mixed { if (is_null($this->tool_choice) || (is_object($this->tool_choice) && empty(get_object_vars($this->tool_choice)))) { unset($this->tool_choice); } return $this; } } 