Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Latest commit

 

History

History
81 lines (54 loc) · 1.92 KB

README.md

File metadata and controls

81 lines (54 loc) · 1.92 KB

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