A simple webpage as gateway to a remote ollama instance. It allows you to chat with any model avaiable in ollama. It will also keep a chat history. For configuration check the default.php file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Steffen Pohle 381e4b8fa0
enabling user registration
2 weeks ago
LICENSE.md update 4 weeks ago
README.md working on the guest user 2 weeks ago
auth.php enabling user registration 2 weeks ago
chat.php enabling guest user 2 weeks ago
default.css basic user management 3 weeks ago
default.php enabling user registration 2 weeks ago
forgot.php basic user management 3 weeks ago
index.html basic user management 3 weeks ago
index.php working on the guest user 2 weeks ago
login.php enabling user registration 2 weeks ago
logout.php basic user management 3 weeks ago
marked.umd.js update 4 weeks ago
reset.php basic user management 3 weeks ago
savechat.php enabling guest user 2 weeks ago
useradmin.php seperated user files and audit logs. 2 weeks ago

README.md

KaI - Ollama Chat

a simple webpage which will connect to a remote ollama instance and allowes you to talk to any model aviable in ollama.

configuration

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

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');