2023-03-17 20:11:13 -06:00
# MatrixGPT
2023-03-18 02:14:45 -06:00
_ChatGPT bot for Matrix._
2023-03-18 02:30:12 -06:00
Uses code from [anoadragon453/nio-template ](https://github.com/anoadragon453/nio-template ).
2023-03-18 02:14:45 -06:00
## Install
```bash
2023-03-18 02:35:55 -06:00
sudo apt install libolm-dev gcc python3-dev
2023-03-18 02:14:45 -06:00
pip install -r requirements.txt
```
2023-03-18 02:56:06 -06:00
Copy `config.sample.yaml` to `config.yaml` and fill it out with your bot's auth and your OpenAI API key.
2023-03-18 02:14:45 -06:00
2023-04-08 15:13:09 -06:00
Then invite your bot and start a chat by prefixing your message with `!c` . The bot will create a thread (you don't need
to use `!c` in the thread).
2023-03-18 02:56:06 -06:00
I included a sample Systemd service.
2023-03-18 14:17:54 -06:00
2023-03-19 16:01:36 -06:00
## Use
Invite the bot to your room and query it with the command `!c` (this can be changed in the config.)
Don't try to use two bots in the same thread.
2023-04-08 15:13:09 -06:00
The bot can give helpful reactions:
- 🚫 means that the user is not allowed to chat with the bot.
- ❌ means the bot encountered an exception. The bot restarts when it encounters an exception which means it will not be able to respond
for a short time after this reaction.
- ❌ 🔐 means there was a decryption failure.
2023-03-18 14:17:54 -06:00
## Encryption
2023-04-08 15:13:09 -06:00
This bot supports encryption. I recommend using [Pantalaimon ](https://github.com/matrix-org/pantalaimon/ ) to manage encryption keys as the built-in solution is a little janky and may be unreliable.