Basic Configuration Setup
Essential configuration after installation.
Configuration Methods
Web Panel (Recommended)
txt
#ai管理面板Visual interface, changes apply immediately.
Config File
Edit config/config.yaml directly.
Essential Settings
1. Add API Channel
yaml
channels:
- name: main
baseUrl: https://api.openai.com/v1
apiKey: ${OPENAI_API_KEY}
model: gpt-4oEnvironment Variables
Store API keys in environment variables for security:
bash
export OPENAI_API_KEY=sk-xxx2. Set Trigger Mode
yaml
trigger:
private: always # Respond to all private messages
group: at # Require @mention in groups
prefix: "#chat" # Optional prefix trigger3. Configure Masters
yaml
masters:
- "123456789" # Your QQ numberVerify Configuration
Test your setup:
txt
#ai状态You should see:
- ✅ Channel connected
- ✅ Model available
- ✅ Tools loaded
Quick Config Examples
Minimal Setup
yaml
channels:
- name: default
baseUrl: https://api.openai.com/v1
apiKey: sk-xxx
model: gpt-4o
trigger:
private: always
group: atWith Proxy
yaml
channels:
- name: default
baseUrl: https://api.openai.com/v1
apiKey: sk-xxx
model: gpt-4o
proxy:
enabled: true
type: http
host: 127.0.0.1
port: 7890Multiple Channels
yaml
channels:
- name: openai
baseUrl: https://api.openai.com/v1
apiKey: ${OPENAI_API_KEY}
model: gpt-4o
priority: 1
- name: deepseek
baseUrl: https://api.deepseek.com
apiKey: ${DEEPSEEK_API_KEY}
model: deepseek-chat
priority: 2Reload Config
After editing config file:
txt
#ai重载配置