1. Go to this page and download the library: Download mertcanekiz/phpydantic library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mertcanekiz / phpydantic example snippets
use Phpydantic\BaseModel;
class Step extends BaseModel
{
/** @Description A detailed explanation for this step */
public string $explanation;
/** @Description The result or output of this step */
public string $output;
}
class MathReasoning extends BaseModel
{
/**
* @var Step[]
* @Description List of reasoning steps
*/
public array $steps;
/** @Description The final answer to the problem */
public string $finalAnswer;
}