How zhayujie/chatgpt-on-wechat works
Main Components Structure
The system should be represented in layers, with these key components:
a) Channel Layer (Top)
• Multiple messaging platforms (WeChat, DingTalk, Feishu, Terminal, Web)
• Each channel has its own implementation for message handling
• Common interface through channel.py
b) Bridge Layer (Middle)
• Handles communication between channels and bots
• Manages context and reply formatting
• Acts as a middleware for message processing
c) Bot Layer (Core)
• Multiple AI model integrations (OpenAI, Claude, Gemini, etc.)
• Session management
• Message processing logic
d) Plugin System (Side)
• Extensible plugin architecture
• Various functional plugins (role-playing, keyword detection, etc.)
• Plugin management system
e) Supporting Services (Bottom)
• Voice processing (multiple providers)
• Translation services
• Image generation capabilities
• Knowledge base integration
Component Relationships
Channels → Bridge → Bot Layer → AI Models
• ↕
• Plugin System
• ↕
• Supporting Services
Detailed Elements
Specific components:
a) Channel Implementations:
• WeChatMP Channel
• WeChatCom Channel
• DingTalk Channel
• Feishu Channel
• Terminal Channel
• Web Channel
b) Bot Implementations:
• OpenAI Bot
• Claude Bot
• Gemini Bot
• Wenxin Bot
• Other AI model integrations
c) Plugin System:
• Plugin Manager
• Event System
• Individual Plugins (Role, Keyword, etc.)
d) Supporting Features:
• Voice Processing (Multiple providers)
• Translation Services
• Image Generation
• Knowledge Base Integration
Technical Details
• Python-based implementation
• Docker container support
• External API integrations
• Database connections (if any)
• Cache systems
• Message queues
Deployment Options
A separate section showing deployment possibilities:
• Local deployment
• Docker deployment
• Railway deployment
• Server deployment
Remember to emphasize the modular nature of the system, showing how new channels or AI models can be easily integrated through the existing architecture.