PHP code example of cymdeveloppement / roundcube-ai

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

    

cymdeveloppement / roundcube-ai example snippets


$config['plugins'] = ['roundcube_ai'];

$config['roundcube_ai_api_url'] = 'https://openrouter.ai/api/v1';
$config['roundcube_ai_api_key'] = 'sk-or-...';
$config['roundcube_ai_model'] = 'google/gemini-2.5-flash';

// Reasoning models are slower and their thinking tokens count in max_tokens
$config['roundcube_ai_extra_params'] = ['reasoning' => ['enabled' => false]];

$config['roundcube_ai_mock_response'] = 'OK';
bash
cp plugins/roundcube_ai/config.inc.php.dist plugins/roundcube_ai/config.inc.php