This bot helps you to interact with ollama models
out.mp4
If you want to generate a completion just send a private message to the bot or if you want to use in a public group use the command /chat followed by the text of your choice. Other commands:
/setmodelChange your current model/start
- >= PHP 8.2
- Mysql
- Access to ollama api
- Clone this repository
git clone https://github.com/Mateodioev/ollama-bot.git
cd ollama-bot- Install dependencies
composer install --optimize-autoloader --no-interaction --no-dev-
Setup your database mysql with file
db/main.sql -
Create an edit .env file
cp .env.example .env
vim .env # Or use your favorite editor- Run the bot
php index.phpNote
If your default model is diferent to
codellamafor examplellama2, edit the filesrc/Events/Middlewares.phpline 13
See ollama docs in https://github.com/jmorganca/ollama