mazzz1y / roundcube-ai
Chat with an AI about the email you are writing: rewrite, refine and compare versions of a draft in the Roundcube compose view, via any OpenAI-compatible API.
Package info
github.com/mazzz1y/roundcube-ai
Type:roundcube-plugin
pkg:composer/mazzz1y/roundcube-ai
Requires
- php: >=8.0
- ext-curl: *
- ext-mbstring: *
- roundcube/plugin-installer: ^0.2 || ^0.3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Chat with an AI about the text you are writing, without leaving Roundcube.
Install
-
Copy the
roundcube_aidirectory into your Roundcubeplugins/folder. The directory name must stayroundcube_ai— it matches the plugin class. -
Enable it in
config/config.inc.php:$config['plugins'][] = 'roundcube_ai';
-
Point it at a model:
cd plugins/roundcube_ai cp config.inc.php.dist config.inc.php$config['roundcube_ai_api_url'] = 'http://localhost:11434/v1/chat/completions'; $config['roundcube_ai_model'] = 'llama3.1';
Or with Composer:
composer require mazy/roundcube-ai
Only api_url and model are required
Configuration
| Option | Default | Meaning |
|---|---|---|
roundcube_ai_api_url |
OpenAI chat completions URL | Full endpoint URL |
roundcube_ai_api_key |
'' |
Bearer token; leave empty for local endpoints |
roundcube_ai_model |
gpt-4o-mini |
Model name |
roundcube_ai_temperature |
0.4 |
Sampling temperature (0–2) |
roundcube_ai_max_tokens |
2000 |
Response token cap |
roundcube_ai_max_input_chars |
20000 |
Max text length sent to the API |
roundcube_ai_context_messages |
20 |
Chat messages kept as context (0 = no limit) |
roundcube_ai_context_chars |
24000 |
Context size in characters (0 = no limit) |
roundcube_ai_timeout |
60 |
HTTP timeout in seconds (1–600) |
roundcube_ai_verify_tls |
true |
TLS certificate verification |
roundcube_ai_default_instruction |
fix grammar, keep language | Used when the prompt is left empty |
roundcube_ai_system_prompt |
built-in | Override the system prompt |
Conversation context is capped by roundcube_ai_context_messages and
roundcube_ai_context_chars; the oldest messages are dropped first. Walking
through versions does not rewind the chat.
Requirements
- Roundcube 1.5 or newer
- PHP 8.0 or newer, with
curlandmbstring
License
MIT
