InfiniGPT is an AI chatbot for the Matrix chat protocol, with a great prompt which allows it to roleplay as almost anything you can think of. It supports OpenAI, xAI, Google, and Ollama models. You can set any default personality you would like. It can be changed at any time, and each user has their own separate chat history with their chosen personality setting. Users can interact with each others chat histories for collaboration if they would like, but otherwise, conversations are separated, per channel, per user.
Also available for IRC at infinigpt-irc
pip install -r requirements.txt
Get an OpenAI API key. Get an xAI API key, and a Google API key. Add those to config.json.
Edit the model lists in the config to contain only the models you want to use.
If you want to use local models, you'll first need to install and familiarize yourself with Ollama, make sure you can run local LLMs, etc. If you can't, don't worry about it, you can just omit these models from the config.
You can install and update it with this command:
curl https://ollama.com/install.sh | sh
Download the models you want to use and replace the ones I've included as examples in the config.
Set up a Matrix account for your bot. You'll need the server, username and password. Add those to the config.json file.
python infinigpt.py
.ai message or botname: message
Basic usage.
.x user message
This allows you to talk to another user's chat history.
user is the display name of the user whose history you want to use
.persona personality
Changes the personality. It can be a character, personality type, object, idea, etc. Don't use a custom system prompt here.
.custom prompt
Allows use of a custom system prompt instead of the built-in one
.reset
Reset to preset personality
.stock
Remove personality and reset to standard GPT settings
.model
List available large language models
.model modelname
Change model
.help
Show the built-in help menu