chatgpt-wecom  by fanchunke

GPT3 integration for WeCom (Weixin Work)

created 2 years ago
352 stars

Top 80.3% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a ChatGPT integration for Enterprise WeChat, enabling multi-turn conversations through a dedicated bot. It's designed for users who want to leverage advanced AI chat capabilities within their existing WeChat work environment.

How It Works

The system acts as a bridge between Enterprise WeChat and the OpenAI API. It manages conversation history, allowing for context-aware, multi-turn dialogues, a feature not present in OpenAI's basic CreateCompletion interface. The architecture supports various databases (MySQL, SQLite, PostgreSQL) for session management.

Quick Start & Requirements

  • Installation: Clone the repository, modify conf/chatgpt.conf, and then use make dockerenv to build the Docker image.
  • Running:
    • Docker (SQLite): docker run -it -d --name chatgpt --restart=always -v $(pwd)/conf/chatgpt.conf:/home/works/program/conf/chatgpt.conf -p 0.0.0.0:8000:8000 chatgpt-wecom:0.1.1
    • Docker (MySQL): docker compose up -d
    • Local: Download binary and run ./chatgpt-wecom -conf=conf/chatgpt.conf
  • Prerequisites: Enterprise WeChat application setup, OpenAI API Key, and a configured database (SQLite is auto-initialized; MySQL/PostgreSQL require manual database creation).
  • Configuration: Requires corp_id, corp_secret, agent_id, encoding_aes_key from Enterprise WeChat, and an OpenAI API Key.
  • Docs: https://github.com/fanchunke/chatgpt-wecom

Highlighted Details

  • Supports multi-turn conversations via session management.
  • Offers Docker and binary deployment options.
  • Database support includes MySQL, SQLite, and PostgreSQL.
  • Handles Enterprise WeChat "enter event" messages.

Maintenance & Community

Recent changelog entries indicate active development, including the addition of Makefiles, Docker Compose support for MySQL, and fixes for prompt length issues and database migration.

Licensing & Compatibility

The repository does not explicitly state a license. Users should verify compatibility for commercial or closed-source use.

Limitations & Caveats

The project does not specify a license, which may impact commercial adoption. Users deploying with MySQL or PostgreSQL must manually create the database before application startup.

Health Check
Last commit

2 years ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.