PHP code example of lifeprisma / roundcube-genia
1. Go to this page and download the library: Download lifeprisma/roundcube-genia 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/ */
lifeprisma / roundcube-genia example snippets
$config['plugins'] = [
// ... your other plugins
'lifeprisma_ai',
];
$config['lifeprisma_ai_providers'] = [
'ollama' => [
'label' => 'Ollama',
'api_url' => 'http://localhost:11434/v1/chat/completions',
'api_type' => 'chat_completions',
'api_key' => '',
'model' => 'llama3.1',
'models' => ['llama3.1', 'mistral', 'qwen2.5'],
'supports_reasoning' => false,
],
];
$config['lifeprisma_ai_providers'] = [
'openai' => [
'label' => 'GPT',
'api_url' => 'https://api.openai.com/v1/responses',
'api_type' => 'responses',
'api_key' => 'sk-proj-xxxxx',
'model' => 'gpt-5.4',
'models' => ['gpt-5.4', 'gpt-4.1'],
],
'anthropic' => [
'label' => 'Claude',
'api_url' => 'https://api.anthropic.com/v1/messages',
'api_type' => 'anthropic',
'api_key' => 'sk-ant-xxxxx',
'model' => 'claude-sonnet-4-6',
'models' => ['claude-sonnet-4-6', 'claude-haiku-4-5-20251001'],
'supports_reasoning' => false,
],
'xai' => [
'label' => 'Grok',
'api_url' => 'https://api.x.ai/v1/responses',
'api_type' => 'responses',
'api_key' => 'xai-xxxxx',
'model' => 'grok-4.1-fast',
'models' => ['grok-4.1-fast', 'grok-3'],
],
];
$config['lifeprisma_ai_providers'] = [
'ollama' => [
'label' => 'Local',
'api_url' => 'http://localhost:11434/v1/chat/completions',
'api_type' => 'chat_completions',
'api_key' => '',
'model' => 'llama3.1',
'models' => ['llama3.1', 'mistral'],
'supports_reasoning' => false,
],
'openai' => [
'label' => 'GPT',
'api_url' => 'https://api.openai.com/v1/responses',
'api_type' => 'responses',
'api_key' => 'sk-proj-xxxxx',
'model' => 'gpt-5.4',
'models' => ['gpt-5.4', 'gpt-4.1'],
],
];
'ollama' => [
'label' => 'Local',
'api_url' => 'http://localhost:11434/v1/chat/completions',
'api_type' => 'chat_completions',
'api_key' => '',
'model' => 'llama3.1',
'models' => ['llama3.1'],
'supports_reasoning' => false,
],
$config['lifeprisma_ai_providers'] = [
'openai' => [
'label' => 'GPT',
'api_url' => 'https://api.openai.com/v1/responses',
'api_key' => 'sk-proj-xxxxx', // Get yours at platform.openai.com/api-keys
'model' => 'gpt-5.4',
'models' => ['gpt-5.4', 'gpt-4.1'],
],
];
bash
cp plugins/lifeprisma_ai/config.inc.php.dist plugins/lifeprisma_ai/config.inc.php
bash
chown root:www-data plugins/lifeprisma_ai/config.inc.php
chmod 640 plugins/lifeprisma_ai/config.inc.php