|
|
|
|
@ -5,6 +5,40 @@ a simple webpage which will connect to a remote ollama instance and allowes you
|
|
|
|
|
|
|
|
|
|
## configuration
|
|
|
|
|
|
|
|
|
|
all configuration is done in the file default.php
|
|
|
|
|
All application configuration is now stored in `default.php`.
|
|
|
|
|
|
|
|
|
|
If you previously used `config.php`, its settings have already been merged into `default.php`.
|
|
|
|
|
|
|
|
|
|
### key settings
|
|
|
|
|
|
|
|
|
|
- `USER_CONFIG_DIR`: directory where user data and chat history are saved.
|
|
|
|
|
- `OLLAMA_URL`: URL of your remote Ollama instance.
|
|
|
|
|
- `GUEST_USER_ENABLED`: enable guest access when set to `true`.
|
|
|
|
|
- `GUEST_USERNAME`: guest account username (default is `guest`).
|
|
|
|
|
- `DEFAULT_MODEL`: default Ollama model used for new chats.
|
|
|
|
|
- `MAIL_FROM` / `MAIL_FROM_NAME`: email sender details for password reset messages.
|
|
|
|
|
- `APP_BASE_URL`: the public app URL used to generate links.
|
|
|
|
|
- `APP_SECRET`: secret key used for authentication token signing and security.
|
|
|
|
|
|
|
|
|
|
> Note: change `APP_SECRET` from the default before deploying to production. Use a long, random value and keep it private.
|
|
|
|
|
|
|
|
|
|
### example settings
|
|
|
|
|
|
|
|
|
|
```php
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
define('USER_CONFIG_DIR', '/var/lib/KaI/users');
|
|
|
|
|
// URL of the Ollama API server, e.g. http://127.0.0.1:11434
|
|
|
|
|
define('OLLAMA_URL', 'http://127.0.0.1:11434');
|
|
|
|
|
|
|
|
|
|
define('GUEST_USER_ENABLED', true);
|
|
|
|
|
define('GUEST_USERNAME', 'guest');
|
|
|
|
|
define('DEFAULT_MODEL', 'llama3.2:latest');
|
|
|
|
|
|
|
|
|
|
define('MAIL_FROM', getenv('MAIL_FROM') ?: 'noreply@kai.local');
|
|
|
|
|
define('MAIL_FROM_NAME', getenv('MAIL_FROM_NAME') ?: 'KaI');
|
|
|
|
|
define('APP_BASE_URL', getenv('APP_BASE_URL') ?: 'http://127.0.0.1/KaI-OllamaChat');
|
|
|
|
|
define('APP_SECRET', getenv('APP_SECRET') ?: 'change-this-secret');
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|