<h1 align="center">
<a href="https://prompts.chat">

Sign in to like and favorite skills

Go check it out over here!
Read about it over here!
This has the official Works On My Machine seal of approval. Nothing is guaranteed.
This guide assumes knowledge of
docker-compose and Python. It also requires
an OpenAI account with ChatGPT access.
To use this tool, you need to run a Maubot server. Sadly, I couldn't get this to work on the official Maubot package, so I've had to modify the Docker container a bit to install all the dependencies.
First, instead of running the normal Maubot server, we need to configure the custom server. To do this, you can try these commands:
git clone --recurse-submodules https://gitlab.com/jeroenhd/chatgpt-maubot.gitcd chatgpt-maubotdocker-compose builddocker-compose up -dThis should run the Maubot server. You can copy over your configuration and data from an existing install or create a new configuration; the setup procedure can be found here: https://docs.mau.fi/maubot/usage/setup/index.html
Now that you have a compatible server running, we need to build the bot. Commands to do so:
python3 -m venv virtualenvsource virtualenv/bin/activatepython3 -m pip install -r requirements.txtmbc buildThis should produce a nice .mbp file for you containing the bot code.
Next, you need to upload the bot to Maubot. You can follow the offical guide for this.
Finally, you need to configure the bot. Log in to the Maubot manager in whatever way you prefer and do the following (use the Maubot docs for details):
There are three fields that can be configured at the moment. You will find dummy variables ready for you after uploading the bot. These fields are:
You need to fill in the email and password field at the moment. Token support is planned but not yet implemented (who knows if it ever will be).
After filling in these details, invite your bot for a chat. You can use the following commands:
!me: send a prompt to the bot!ping: check if the bot is still operational!reset: reset the conversation and start over!reconnect: reconnect top ChatGPT if the connection died for some reasonConversations are shared between users and ChatGPT might ban your account.
You're probably running the official Maubot image. This is currently not supported. Use the custom Dockerfile to get around this.
ChatGPT isn't very fast sometimes! Be patient and give the bot a minute to start after starting the server/reconnecting the bot.
The official Maubot image relies on Alpine but the library this bot is written around has a dependency that doesn't work on Alpine because of a Go compiler issue.
This Docker image is based on the official version but was rewritten for Debian + glibc support to make the dependencies work.
I don't have access to an ARM device (nor the interest to be honest) to test proper ARM Docker support. Pull requests are welcome. Compatibility shouldn't be too hard to accomplish, I just don't know how.
The original library uses
requests rather than aiohttp for HTTP
communication and that's not very efficient for Maubot. It also reduces
the amount of transitive dependencies.
Sorry, the two projects that do most of the heavy lifting are GPL-2 or GPL-3 licensed. Feel free to write your own bot or pick another if this is a problem for you.