Skip to content

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-4o

Environment Variables

Store API keys in environment variables for security:

bash
export OPENAI_API_KEY=sk-xxx

2. Set Trigger Mode

yaml
trigger:
  private: always     # Respond to all private messages
  group: at          # Require @mention in groups
  prefix: "#chat"    # Optional prefix trigger

3. Configure Masters

yaml
masters:
  - "123456789"      # Your QQ number

Verify 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: at

With 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: 7890

Multiple 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: 2

Reload Config

After editing config file:

txt
#ai重载配置

Next Steps

Released under the MIT License