ChatGPT-in-Slack  by seratch

Slack app for ChatGPT integration

created 2 years ago
506 stars

Top 62.4% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Slack application enabling users to interact with ChatGPT directly within their Slack workspaces. It's designed for both individual users and corporate environments, offering a seamless way to integrate AI-powered assistance for planning, writing, and general queries, thereby enhancing productivity.

How It Works

The application leverages Slack's Socket Mode for real-time communication, allowing it to function without requiring a public URL. Users can interact with ChatGPT through channel threads, direct messages, or a dedicated Home tab. The bot maintains conversation context within threads, enabling natural, multi-turn dialogues. The Home tab offers additional features like API key configuration, a quick proofreader, and a prompt sender dialog, with support for DALL-E 3 image generation.

Quick Start & Requirements

  • Install: Clone the repository, set up a Python virtual environment, install dependencies (pip install -r requirements.txt), and run python main.py.
  • Prerequisites: OpenAI API key, Slack app-level token (xapp-1-...), and Slack bot token (xoxb-...). Python 3.x is required.
  • Configuration: Environment variables like OPENAI_API_KEY, SLACK_BOT_TOKEN, and SLACK_APP_TOKEN must be set. Optional variables control model selection, temperature, timeouts, language translation, markdown conversion, redaction, and image file access. Azure OpenAI is also supported.
  • Demo: A live demo is available at https://bit.ly/chat-gpt-in-slack.

Highlighted Details

  • Supports multiple interaction interfaces: channel threads, 1:1 DMs, and the Home tab.
  • Maintains conversation history within Slack threads for context-aware interactions.
  • Includes features for proofreading, prompt sending, and DALL-E 3 image generation via the Home tab.
  • Offers extensive configuration options via environment variables for model, language, and feature customization.
  • Dockerfile provided for deployment on corporate infrastructure.

Maintenance & Community

The project is maintained by @seratch. Contributions are welcome, with guidelines for maintaining backward compatibility and writing unit tests. A validation script (./validate.sh) is available for code formatting and analysis.

Licensing & Compatibility

The project is released under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The live demo is personally hosted and may not be suitable for critical corporate use. While the project supports various OpenAI models, specific version compatibility should be verified. The "Function Calling" feature is experimental.

Health Check
Last commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
2
Star History
18 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.