55---
66> [ !IMPORTANT]
77>
8- > ** Major Refactor (2025/01 ):**
8+ > ** Major Refactor (2025/07 ):**
99> - ** 5 AI Providers** : Free (g4f), OpenAI, Claude, Gemini, Grok
10- > - ** Dynamic Provider Switching** : Use ` /provider ` command to switch between providers
11- > - ** Enhanced Security** : Admin-only jailbreak personas with modern prompts
12- > - ** Improved Architecture** : Modular provider system with fallback support
13- > - ** Docker Security** : Hardened containers with non-root user and read-only filesystem
14- > - ** Comprehensive Testing** : Full test suite with pytest integration
1510> - ** No Cookie Authentication** : Removed unreliable cookie-based auth for free providers
1611
1712### Chat
7065
7166## Provider Configuration
7267
73- ### Free Provider (Always Available)
74- The bot includes a free provider using g4f library with multiple fallback providers:
75- - ** Blackbox** : General-purpose AI chat
76- - ** Chatai** : GPT-3.5 and GPT-4 compatible models
77- - ** CohereForAI** : Command-R and Command-R Plus models
68+ ### Free Provider (unstable)
69+ Outdated model, close to GPT-3.5 or GPT-4 capabilities
7870
79- No configuration required - works out of the box!
71+ No configuration required
8072
8173### Premium Providers (Optional)
8274
@@ -96,7 +88,7 @@ No configuration required - works out of the box!
96881 . Get API key from https://x.ai/api
97892 . Add to ` .env ` : ` GROK_KEY=your_api_key_here `
9890
99- Use ` /provider ` command in Discord to switch between available providers!
91+ Use ` /provider ` command in Discord to switch between available providers
10092
10193## Image Generation
10294
@@ -136,9 +128,6 @@ Image generation is now integrated with the provider system:
136128
137129* Set the value of ` LOGGING ` in the ` .env ` to False
138130
139- ------
140- > [ ** 中文設置教學** ] ( https://zero6992.me/2023/03/08/chatGPT-discord-bot-chinese/ )
141- ------
142131## Commands
143132
144133### Core Commands
@@ -179,45 +168,3 @@ Jailbreak personas require admin privileges for enhanced security:
179168- Secure API key management via environment variables
180169- Docker security hardening with non-root user
181170- Read-only filesystem for container security
182-
183-
184- ## Testing
185-
186- Run the comprehensive test suite:
187-
188- ``` bash
189- # Run all tests
190- pytest
191-
192- # Run specific test categories
193- pytest -m unit # Unit tests only
194- pytest -m integration # Integration tests only
195- pytest -m slow # Slow tests only
196-
197- # Run with coverage
198- pytest --cov=src
199-
200- # Run specific test file
201- pytest tests/test_providers.py
202- ```
203-
204- ## Architecture
205-
206- ### Provider System
207- - ** BaseProvider** : Abstract base class defining provider interface
208- - ** Concrete Providers** : Free, OpenAI, Claude, Gemini, Grok implementations
209- - ** ProviderManager** : Handles dynamic switching and fallback logic
210- - ** Automatic Fallback** : Falls back to free provider if premium providers fail
211-
212- ### Security Layers
213- 1 . ** Environment Variables** : Secure API key storage
214- 2 . ** Admin Controls** : Restricted access to sensitive features
215- 3 . ** Input Validation** : All commands validate user input
216- 4 . ** Docker Hardening** : Non-root user, read-only filesystem
217-
218- ### Conversation Management
219- - Configurable conversation length limits
220- - Automatic history trimming to prevent memory issues
221- - Persona persistence across conversation resets
222-
223- ---
0 commit comments