This project provides a proxy for Coze bots on Discord, enabling API access to GPT-4 models for chat, image generation, and retrieval-augmented generation. It targets users of popular chat interfaces like NextChat and LobeChat, offering a unified API endpoint for various AI functionalities.
How It Works
The proxy acts as an intermediary, intercepting requests intended for OpenAI's API and forwarding them to Coze bots hosted on Discord. It leverages Discord's API to interact with Coze bots, translating requests into a format Coze understands and then returning responses in an OpenAI-compatible format. This approach allows users to access Coze's capabilities through familiar OpenAI API endpoints.
Quick Start & Requirements
- Installation: Deploy via Docker Compose (
docker-compose pull && docker-compose up -d
) or Docker run command.
- Prerequisites: Discord account, Coze account, Discord Developer Portal access, Coze bot setup, and obtaining specific tokens and IDs (USER_AUTHORIZATION, BOT_TOKEN, GUILD_ID, COZE_BOT_ID).
- Configuration: Requires setting environment variables for Discord and Coze bot credentials.
- Documentation: CDP项目文档站 (linked in README)
Highlighted Details
- Compatible with NextChat, one-api, LobeChat, and other chat panels.
- Supports OpenAI-aligned chat, DALL-E 3 image generation, and GPT-4V-style multimodal input (URL or base64).
- Enables load balancing across multiple Discord users and Coze bots via configuration.
- Provides API documentation via Swagger at
<ip>:<port>/swagger/index.html
.
Maintenance & Community
- Active development with issue tracking.
- Community support via Discord group.
- Links to notification channels and project documentation are provided.
Licensing & Compatibility
- The README does not explicitly state a license.
- Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
- Requires significant setup involving Discord and Coze bot creation and credential retrieval.
- Relies on Discord's API, which may be subject to changes or rate limits.
- The project's stability and long-term maintenance depend on the continued availability and compatibility of Coze and Discord APIs.