<?php
namespace App\AI\Api\ChatGpt\Responses; class Body extends \stdClass { public $model; public $input = []; public $tools = []; public $tool_choice; public $metadata; public $user; public function __construct() { $this->metadata = new \stdClass(); } public function addInput(\App\AI\Api\ChatGpt\Responses\Input $inputObj) { if (is_null($inputObj->type)) { unset($inputObj->type); } if (is_null($inputObj->role)) { unset($inputObj->role); } if (is_null($inputObj->content)) { unset($inputObj->content); } if (is_null($inputObj->arguments)) { unset($inputObj->arguments); } if (is_null($inputObj->call_id)) { unset($inputObj->call_id); } if (is_null($inputObj->name)) { unset($inputObj->name); } if (is_null($inputObj->output)) { unset($inputObj->output); } $this->input[] = $inputObj; } public function addTool(\App\AI\Api\ChatGpt\Responses\ToolFunction $funcStdObj) { $this->tools[] = $funcStdObj; } public function setMetadata($key, $value) { $this->metadata->$key = $value; } } 