40 lines
1.4 KiB
Markdown
40 lines
1.4 KiB
Markdown
# MatrixGPT
|
|
|
|
_ChatGPT bot for Matrix._
|
|
|
|
Uses code from [anoadragon453/nio-template](https://github.com/anoadragon453/nio-template).
|
|
|
|
## Install
|
|
|
|
```bash
|
|
sudo apt install libolm-dev gcc python3-dev
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
Copy `config.sample.yaml` to `config.yaml` and fill it out with your bot's auth and your OpenAI API key.
|
|
|
|
[Pantalaimon](https://github.com/matrix-org/pantalaimon) is **required** for the bot to be able to talk in encrypted rooms.
|
|
|
|
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).
|
|
|
|
I included a sample Systemd service.
|
|
|
|
## 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.
|
|
|
|
The bot will move its read marker when a new message is sent in the room.
|
|
|
|
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.
|
|
|
|
## Encryption
|
|
|
|
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.
|