PHP code example of jkudish / pest-plugin-ai-benchmarks
1. Go to this page and download the library: Download jkudish/pest-plugin-ai-benchmarks 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/ */
jkudish / pest-plugin-ai-benchmarks example snippets
use App\Ai\Agents\ReceiptOcrAgent;
use Jkudish\PestAiBenchmarks\LaravelAi\BenchmarkAgentMiddleware;
use Laravel\Ai\Attributes\Strict;
use Laravel\Ai\Attributes\Timeout;
use Laravel\Ai\Contracts\HasMiddleware;
#[Strict]
#[Timeout(60)]
final class BenchmarkReceiptOcrAgent extends ReceiptOcrAgent implements HasMiddleware
{
public function middleware(): array
{
return [new BenchmarkAgentMiddleware];
}
}
use Jkudish\PestAiBenchmarks\LaravelAi\InstrumentedAgent;
InstrumentedAgent::assertFaithful(BenchmarkReceiptOcrAgent::class);