Slack Chatbot with OpenAI's GPT is a conversational chatbot that functions on Slack. This chatbot utilizes OpenAI's ChatGPT API, a state-of-the-art language model, to generate human-like responses during chat-based conversations.
- Automatically responds to mentions on Slack.
- Engages in simple conversations with users.
- Uses the OpenAI's GPT-3 API to enable more natural and fluid conversations.
- Has the ability to remember previous conversations with users.
- Slack API tokens
- An OpenAI API Key
cp .env.sample .env
vim .env # edit .env file
docker image build . -t slack-chatgpt
docker run -it --env-file=.env slack-chatgpt
-
Create a Slack app based on the manifest.yml file and obtain the SLACK_BOT_TOKEN and SLACK_APP_TOKEN. Also, create an OpenAI account and obtain an API Key.
-
Clone this repository.
$ git clone https://github.com/kkosuge/slack-chatgpt.git -
Install required libraries.
$ yarn install -
Copy the .env.sample file and rename it to .env.
$ cp .env.sample .env -
Edit .env file and insert your Slack API token and OpenAI API Key.
-
Run the bot locally.
$ yarn dev
- Add this chatbot to your Slack channel.
- In a Slack conversation, type a mention of your chatbot's name: @
- The chatbot will respond and initiate a chat with you.
MIT License