context-machine-lab /
sleepless-agent
π€ 24/7 AI agent that maximizes Claude Code Pro usage via Slack. Auto-processes tasks, manages isolated workspaces, creates Git commits/PRs, and optimizes day/night usage thresholds.
79/100 healthLoading repository dataβ¦
pedrorito / repository
π€ A Slack bot that integrates with OpenAI's ChatGPT to provide answers, written in Python
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This is a simple Slackbot that uses the acheong08/ChatGPT revChatGPT package to respond to messages in Slack. It is designed to be used with the Slack Events API, and it listens for app_mention events, which are triggered when a user mentions the bot in a Slack channel.
When the bot receives a app_mention event, it extracts the user's message from the event payload, sends it to the revChatGPT package to generate a response, and then sends the response back to the user via Slack.
The revChatGPT package is used to handle authentication and communication with the GPT-3 API, and it is also used to refresh the session with the GPT-3 API on a regular basis. This is done in a separate thread to prevent the session from expiring while the bot is handling requests.
To use the bot, you will need to install the dependencies and set the OPENAI_API_KEY environment variable that you can get from https://platform.openai.com/account/api-keys. You also need to set SLACK_SIGNING_SECRET and SLACK_BOT_TOKEN environment variables after creating the Slack App. You can then run the app.py script to start the bot.
pip install -r requirements.txt
export SLACK_SIGNING_SECRET=slack_signing_secret
export SLACK_BOT_TOKEN=slack_bot_token
export OPENAI_API_KEY=you_openai_api_key
python app.py
Alternatively, you can use the containerized version by setting the environment variables in the variables.env file and then run
docker-compose up -d
Once the bot is running, you can mention it in a Slack channel to send it a message. For example, you can type @my-bot hello to send the message "hello" to the bot. The bot will respond with a generated message based on the GPT-3 model.
The ChatGPTConfig dictionary at the top of the app.py script contains the configuration for the revChatGPT package. It specifies the API token for the OpenAI account that the bot will use to authenticate with the GPT-3 API. The value is read from the OPENAI_API_KEY environment variable.
The conversation_id parameter in the Chatbot constructor is used to specify the ID of the conversation that the bot should use. If this parameter is not provided, the revChatGPT package will generate a new conversation ID for each message that the bot receives.
By default, app.py is exposing port 4000 for Slack events. You may change the port number in the end of the script.
To configure the Slack App, follow these example instructions from the official SlackApi GitHub account.
For this bot, the required Scopes in OAuth & Permissions are:
For direct message required & config :
Enable bot direct messages go to : Features -> App Home -> (Enable) Messages TabOAuth & Permissions im:history and message:imIn the Event Subscriptions, you need to subscribe to the app_mention event.
The bot uses a pre-trained GPT-3 model, which means that its responses are limited to the information that is contained in the model. It may not be able to respond accurately to messages that are outside the scope of the pre-trained model.
The tls-client python library that is used by the revChatGPT package does not currently support ARM architectures. As a result, the bot may not be able to run on devices with ARM processors. This limitation will be addressed in a future update.
This is a personal project and is not affiliated with OpenAI or Slack in any way.
This project is released under the terms of the GPL 2.0 license. For more information, see the LICENSE file included in the repository.
Selected from shared topics, language and repository descriptionβnot editorial ratings.
context-machine-lab /
π€ 24/7 AI agent that maximizes Claude Code Pro usage via Slack. Auto-processes tasks, manages isolated workspaces, creates Git commits/PRs, and optimizes day/night usage thresholds.
79/100 healthTmw /
Edward Scissorhands is a Slackbot that utilizes machinelearning to remove the background of images share with Edward π€βοΈ
43/100 healthfilippofinke /
π€ Service to automatically update Slack status based on a schedule and configurable rules.
Saritaa2710 /
π€ Enhance your research with SurfSense, a customizable AI agent that connects to multiple platforms for smarter, effective information retrieval.
75/100 healthshivangsingh26 /
π slackAgent: Your AI-powered Slack assistant! Built with LlamaIndex, ChromaDB, and OpenAI embeddings, it delivers instant answers from your documents via a sleek Slack bot or Streamlit web UI. Automate workflows with n8n, expose local APIs with ngrok, and query with ease using FastAPI. Join the future of intelligent chatbots! π€π¬
61/100 healthelkaix /
π€ β a tiny personal AI agent framework. Chat channels (Slack, Telegram, Discord, WhatsApp, β¦), memory, MCP, and an OpenAI-compatible API in one small Python core.
61/100 health