The Open-Source Slack AI App
The Open-Source Slack AI is a self-hosted software solution designed to enhance Slack functionality by using AI to summarize conversations in threads and channels. Built in September 2023, this open-source tool allows users to bypass the limited access and additional costs of the official Slack AI product. It provides comprehensive capabilities to generate concise summaries and overviews of Slack communications using OpenAI's GPT models.
Key Features
-
Thread Summaries: Users can easily create detailed summaries of any Slack thread. This feature is powered by GPT-3.5-Turbo, ensuring quick and reliable summarization.
-
Channel Overviews: This feature allows users to generate an outline of a channel's purpose by analyzing its message history. The analysis uses a combination of NLP models and GPT-4 to explain the summary in plain language.
-
Channel Summaries Since a Specific Date: Users can produce summaries of a channel's messages from a particular date onwards. This function also uses GPT-3.5-Turbo and supports custom prompts, allowing for personalized outputs such as anonymizing summaries.
-
Full Channel Summaries (Experimental): Offers an extensive summary of a channel's entire history using GPT-3.5-Turbo, with the option for custom prompts.
Getting Started
Setting up the Open-Source Slack AI requires a few prerequisites and steps:
Prerequisites
- Python: Version 3.9.x to 3.11.x is required.
- OpenAI API Key: Necessary for accessing GPT models from OpenAI.
- Slack App & API Tokens: Required for app integration.
- Poetry Package Manager: Facilitates easy package management.
- Ngrok: Recommended for server exposure to the internet.
Installation
- Clone the Repository: Download the project files to your local machine.
- Navigate to the Directory: Use command-line interface (CLI) to access the folder containing the project files.
- Install Dependencies: Using the command
poetry install
, install the necessary Python packages. - Setup Environment Variables: Create a
.env
file based on theexample.env
and input your API keys and tokens.
Slack App Configuration
Modify the provided manifest.json
to match your server URL (such as a URL provided by ngrok). Create a new Slack app and configure it with your manifest file. You'll need to adjust settings like the bot token and app-level tokens for the Open-Source Slack AI app to function correctly.
Usage
Run the application locally using FastAPI. This involves starting a server to handle requests and exposing it using ngrok so that it’s accessible over the internet. Afterward, integrate this server URL with your Slack app settings.
Customization
Users can tailor the summarization processes by modifying specific script files. Channel and thread summaries can be customized through the topic_analysis.py
and summarizer.py
scripts, respectively.
Testing
Testing is conducted using the pytest
framework. By running tests through pytest
, users can ensure code functionality and check test coverage for reliability.
Future Enhancements
The project roadmap includes potential features such as integrating threaded conversations into summaries, supporting additional language models, and incorporating external contextual data. Performance optimizations like caching and adding sentiment analysis are also under consideration.
Contributing
Contributions to the project are encouraged. Developers interested in improving or customizing the project can refer to CONTRIBUTING.md
for guidelines on submitting feedback and code changes.
This open-source project is a robust tool for organizations looking to leverage AI in managing Slack communications effectively, and it is licensed under the GPL-3.0 License.