GPTBot: an Open-Source GPT-4 Slack Bot

Olivier Pichon
2 min readMar 21, 2023

Last week-end, I worked on a new open source project: a fully serverless Slack bot with GPT-4 support and full conversation mode. It looks like this:

Collaboration with GPTBot (Video credit: René Goretzka)

As mentioned, it is Open-Source and its repository can be found here: https://github.com/LIFTE-H2/GPTBot

Features:

The new release of ChatGPT last week was all over the News and Social Medias. I wondered if I could bring that power to Slack with minimal effort, and sure enough was able to get something up and running in only two days! Having been written relatively quickly by a single developer, the functionality is of course somewhat limited. But here is what it currently supports:

  • Getting a one-off response from GPTBot when mentioning the bot (@GPTBot) in a channel you are both a member of:
  • Exchanging a full conversation with context carried over. To start a full conversation, run the command: /gptbot start. To end the conversation, run the command: /gptbot stop.
  • Using the latest GPT-4 model. If you want to start a conversation with the new GPT-4 model, run the command /gptbot start gpt-4. In this mode, responses take a longer time. By default, the model used is gpt-3.5-turbo.
  • Collaborating together as colleagues with the bot refining its answers. (See initial video on top of this article)

Architecture

This project deploys to AWS using the Serverless Framework (it deploys to AWS Lambda, API Gateway and DynamoDB). Detailed instructions on how to install the Bot can be found in its repository.

Next Steps

I would like to thank my company, LIFTE H2, who believes in the strength of Open-Source and provided me with all the resources I needed this week allowing me to add the required documentation and Open-Source this project during my working hours. LIFTE H2 will also support this initiative going forward. But of course, we are only just a small team. So we officially warmly welcome and encourage anyone interested in contributing to this project going forward to submit your Pull Requests!

--

--

Olivier Pichon

Ocean Lover, Freediver, Yoga and Meditation Practitioner, Software Engineer.