https://github.com/meetbryce/open-source-slack-ai Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} meetbryce / open-source-slack-ai Public * Notifications * Fork 2 * Star 73 * An open source alternative to some of Slack AI's premium features. Summarize channels and threads anytime you want. License GPL-3.0 license 73 stars 2 forks Branches Tags Activity Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights meetbryce/open-source-slack-ai This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 69 Commits .github .github .idea .idea hackathon_2023 hackathon_2023 tests tests .gitignore .gitignore CONTRIBUTING.md CONTRIBUTING.md LICENSE.md LICENSE.md README.md README.md example.env example.env hackathon-2023.iml hackathon-2023.iml poetry.lock poetry.lock pyproject.toml pyproject.toml View all files Repository files navigation * README * GPL-3.0 license The Open-Source Slack AI App Test Coverage Maintainability GitHub License contributions welcome X (formerly Twitter) Follow This repository is a ready-to-run basic Slack AI solution you can host yourself and unlock the ability to summarize threads and channels on demand using OpenAI (support for alternative and open source LLMs will be added if there's demand). The official Slack AI product looks great, but with limited access and add-on pricing, I decided to open-source the version I built in September 2023. Learn more about how and why I built an open-source Slack AI. Once up and running (instructions for the whole process are provided below), all your Slack users will be able to generate to both public and private: 1. Thread summaries - Generate a detailed summary of any Slack thread (powered by GPT-3.5-Turbo) 2. Channel overviews - Generate an outline of the channel's purpose based on the extended message history (powered by an ensemble of NLP models and a little GPT-4 to explain the analysis in natural language) 3. Channel summaries (beta) - Generate a detailed summary of a channel's extended history (powered by GPT-3.5-Turbo). Note: this can get very long! Table of Contents * Getting Started + Prerequisites + Installation + Usage + Customization * Testing * Future Enhancements * Contributing Getting Started Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes. Prerequisites Ensure you have the following preconfigured or installed on your local development machine: * Python 3.8 or higher * OpenAI API key * Slack App & associated API tokens * Poetry package manager * ngrok (recommended) Installation 1. Clone the repository to your local machine. 2. Navigate to the project directory. 3. Install the required Python packages using Poetry: poetry install 4. Create a .env file in the root directory of the project, and fill it with your API keys and tokens. Use the example.env file as a template. cp example.env .env && open .env Slack app configuration TODO Usage To run the application, run the FastAPI server: uvicorn slack_server:fast_app --reload You'll then need to expose the server to the internet using ngrok. Run ngrok with the following command: ngrok http 8000 Then add the ngrok URL to your Slack app's settings. Customization The main customization options are: * Channel Summary: customize the ChatGPT prompt in topic_analysis.py * Thread Summary: customize the ChatGPT prompt in summarizer.py Testing This project uses pytest and pytest-cov to run tests and measure test coverage. Follow these steps to run the tests with coverage: 1. Navigate to the project root directory. 2. Run the following command to execute the tests with coverage: pytest --cov=hackathon_2023 tests/ This command will run all the tests in the tests/ directory and generate a coverage report for the hackathon_2023 module. 3. After running the tests, you will see a report in your terminal that shows the percentage of code covered by tests and highlights any lines that are not covered. Please note that if you're using a virtual environment, make sure it's activated before running these commands. Future Enhancements * [ ] Add support for alternative and open-source LLMs * [ ] Add support for anonymized message summaries * [ ] Leverage prompt tools like Chain of Destiny * [ ] Add support for pulling supporting context from external sources like company knowledge bases * [ ] Explore caching and other performance optimizations * [ ] Explore sentiment analysis * [ ] Explore migrating to LangChain for more extensibility & control Contributing I more than welcome contributions! Please read CONTRIBUTING.md for details on how to submit feedback, bugs, feature requests, enhancements, or your own pull requests. License This project is licensed under the GPL-3.0 License - see the LICENSE.md file for details. About An open source alternative to some of Slack AI's premium features. Summarize channels and threads anytime you want. Topics slack ai slack-bot generative-ai Resources Readme License GPL-3.0 license Activity Stars 73 stars Watchers 1 watching Forks 2 forks Report repository Releases No releases published Languages * Python 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.