This repo is a Slack app that creates a slash command for Slack that will call to ChatGPT and receive a private response back.
Services required:
- Slack
- Glitch.com paid account (or another server, although this guide only covers using Glitch)
- OpenAI API Key
- (GitHub) Star this Repo
- (glitch) Create your account with Glitch.com
- (glitch) Create a new product via GitHub import
- (glitch) Paste in the "http" GitHub repo link
- (glitch) This should import all the required files into the repo.
- (Slack) Go to developers.slack.com
- (Slack) Create App
- (Slack) Create using a manifest file
- (GitHub) Open "raw" the manifest.txt file
- (GitHub) Select all and copy the text
- (Slack) Paste the manifest text into the slack window where it asks for your Manifest data.
- (Slack) Add a app token (copy it)
- (glitch) open the .env file and replace the app token variable with your app token from Slack
- (Slack) Go to OAuth and create a bot token
- (glitch) Replace the bot token with the one from Slack
- (OpenAI) Goto platform.OpenAI.com/api and generate an API key.
- (glitch) Replace the OpenAI token in the .env file with the one from OpenAPI.
- (Slack) Install the app on your workspace
- (glitch) Open the terminal
- (glitch) paste in "pip3 install -r requirements.txt" to install the requirements.
- (glitch) paste in "python3 chatgpt_slack_app.py" to start the program which will activate the app in Slack
- (Slack) test your /chatGPT slack command.