Chatbots for Matrix.
Go to file
Cyberes d53517e3fb log number of retries left, add error message to msg 2023-05-24 13:52:40 -06:00
matrix_gpt log number of retries left, add error message to msg 2023-05-24 13:52:40 -06:00
.gitignore add system prompt 2023-03-18 13:32:04 -06:00
LICENSE Initial commit 2023-03-17 20:11:13 -06:00
README.md mark unknown events as read, no longer require model config key 2023-04-19 13:22:15 -06:00
config.sample.yaml support multiple models 2023-03-31 23:08:27 -06:00
main.py fix async issues 2023-04-19 17:01:07 -06:00
matrixgpt.service service 2023-03-18 02:41:29 -06:00
requirements.txt handle timeouts 2023-03-19 15:37:55 -06:00

README.md

MatrixGPT

ChatGPT bot for Matrix.

Uses code from anoadragon453/nio-template.

Install

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.

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 to manage encryption keys as the built-in solution is a little janky and may be unreliable.