/slack-chatgpt

Reply to slack threads with chatGPT

Primary LanguagePythonMIT LicenseMIT

slack-gpt

PyPI PyPI - Python Version PyPI - License Coookiecutter - Wolt


Documentation: https://Glyphack.github.io/slack-gpt

Source Code: https://github.com/Glyphack/slack-gpt

PyPI: https://pypi.org/project/slack-gpt/


Reply to slack message without thinking with GPT3

Usage

Step 1. Create an slack bot

  1. Goto https://api.slack.com/apps and create new app
  2. Enable Events for the bot and subscribe to event app_mention and set the callback to "yourdomain.com/slack/events"
  3. Add permission in Oauth & Permissions tab add the following permissions
app_mentions:read
channels:history
chat:write
chat:write.public
commands
groups:history
im:history
incoming-webhook
mpim:history
  1. Copy the Bot User OAuth Token
  2. Copy the Signing Secret

Step 2. Register in chatGPT

https://chat.openai.com/chat

Step 3. Fill the secrets

Open src/slack_gpt/main.py and fill the env values from secrets above.

Step 4

...

Step 5

Profit

Development

  • Clone this repository
  • Requirements:
  • Create a virtual environment and install the dependencies
poetry install
  • Activate the virtual environment
poetry shell

Testing

pytest