PHP code example of larswiegers / laravel-ai-evaluation
1. Go to this page and download the library: Download larswiegers/laravel-ai-evaluation 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/ */
larswiegers / laravel-ai-evaluation example snippets
use LaravelAIEvaluation\AIEval;
it('answers refund policy questions', function () {
AIEval::agent(App\Ai\Agents\SupportAgent::class)
->input('Can I get a refund?')
->expectContains(['refund', '30 days'])
->run()
->assertPasses();
});