Slack bot for ChatGPT integration
Top 75.6% on sourcepulse
This project provides a Slack bot that integrates with OpenAI's ChatGPT, enabling users to interact with the AI directly within Slack channels. It's designed for Slack users and developers who want to leverage ChatGPT's capabilities for answering questions, generating text, or automating tasks within their Slack workspaces.
How It Works
The bot utilizes the revChatGPT
Python package to handle authentication and communication with the OpenAI API. It listens for app_mention
events via the Slack Events API. Upon receiving a mention, it extracts the user's message, sends it to revChatGPT
for processing by a GPT-3 model, and then posts the generated response back to the Slack channel. Session management for the API is handled in a separate thread to prevent expiration.
Quick Start & Requirements
pip install -r requirements.txt
SLACK_SIGNING_SECRET
, SLACK_BOT_TOKEN
, OPENAI_API_KEY
.python app.py
docker-compose up -d
after configuring variables.env
.app_mentions:read
, chat:write
, im:write
scopes (and im:history
, message:im
for direct messages).app_mention
events in Slack Event Subscriptions.Highlighted Details
revChatGPT
for OpenAI API interaction.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The bot relies on a pre-trained GPT-3 model, limiting its knowledge to the data it was trained on. The tls-client
library used by revChatGPT
does not currently support ARM architectures, preventing operation on ARM-based devices.
2 years ago
1+ week