PHP code example of alnutile / laravel-chatgpt
1. Go to this page and download the library: Download alnutile/laravel-chatgpt 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/ */
alnutile / laravel-chatgpt example snippets
$moderationOk = ModerationClientFacade::checkOk(request()->search);
if ($moderationOk == false) {
ModerationFailed::dispatch(request());
} else {
$results = TextClientFacade::addPrefix('can you give me tl;dr terms of service for')->text($search);
SearchResults::dispatch($results);
}