PHP code example of cryodrift / ai

1. Go to this page and download the library: Download cryodrift/ai 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/ */

    

cryodrift / ai example snippets

bash
php index.php -echo /ai resp -model="gpt-4o" -provider=oairesp -content="src/app/input.txt" -content="src/app/docs.md" -outfile="src/app/result.html" -send
bash
echo "Übersetze dies ins Englische" | php index.php -echo /ai resp -model="gpt-4o" -provider=oairesp -content -outfile="result.txt" -send
bash
php index.php -echo /ai batch -model="gpt-4o" -provider=oairesp -content="task.txt" -outfile="batch_result.html" -send
bash
php index.php -echo /ai batches -status -id=BATCH_ID_HERE
bash
php index.php -echo /ai batches
bash
php index.php -echo /ai models -provider=locresp -send
bash
php index.php -echo /ai files -provider="oairesp"
bash
php index.php -echo /ai files -provider="oairesp" -read -id=file-ID_HERE -outfile="downloaded.html"
bash
php index.php -echo /ai extract -msg=".cryodrift/data/ai/message_id.chat" -outfile="src/data/input.html"