-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
97 lines (80 loc) · 3.97 KB
/
Copy path.env.example
File metadata and controls
97 lines (80 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Example environment configuration
# Copy this file to .env and fill in your credentials
# ==================== Environment ====================
ENVIRONMENT=dev
# ==================== Driver Configuration ====================
DRIVER=~fastapi+~httpx+~websockets
# Docker 环境需改为 0.0.0.0,让 NapCat 容器能访问
HOST=0.0.0.0
PORT=8080
# ==================== Local Storage ====================
LOCALSTORE_USE_CWD=true
# ==================== Logging ====================
LOG_LEVEL=INFO
# ==================== Command Configuration ====================
COMMAND_START=["/", ""]
COMMAND_SEP=["."]
# ==================== QQ Bot Configuration (NapCat / OneBot V11) ====================
# NapCat via Docker: start napcat container, login via http://localhost:6099/webui
# NapCat reverse WS is pre-configured in napcat/config/network.json → ws://bot:8080/onebot/v11/ws
# Recommended login: set ACCOUNT + NAPCAT_QUICK_PASSWORD
# Fallback: NAPCAT_QUICK_PASSWORD_MD5
ACCOUNT=YOUR_QQ_ACCOUNT
NAPCAT_QUICK_PASSWORD="your-qq-password"
# NAPCAT_QUICK_PASSWORD_MD5="your-qq-password-md5"
# Optional: set a shared token between NapCat and this bot
# ONEBOT_ACCESS_TOKEN="your-shared-token"
# ==================== Telegram Bot Configuration ====================
# Get token from @BotFather: https://t.me/botfather
telegram_bots='[{"token": "YOUR_BOT_TOKEN"}]'
# If you're in mainland China, configure proxy:
# telegram_proxy="http://127.0.0.1:7890"
# ==================== Superuser ====================
SUPERUSERS=["YOUR_USER_ID"]
# ==================== Bot Nickname ====================
NICKNAME=["keytao-bot", "bot"]
# ==================== Keytao API Configuration ====================
# Keytao API base URL (for all API operations)
KEYTAO_API_BASE="https://keytao.vercel.app"
# Bot API token (must match BOT_API_TOKEN in keytao-next)
# Generate with: openssl rand -hex 32
BOT_API_TOKEN="your-bot-api-token-min-32-characters-long-change-me"
# Optional: extra KeyTao developer API key headers for non-bot API calls.
# Bot draft/batch operations only require BOT_API_TOKEN plus a bound platform user.
# KEYTAO_API_KEY="your-keytao-developer-api-key"
# KEYTAO_USER_API_KEYS='{"qq:YOUR_QQ_ID":"user-api-key","telegram:YOUR_TELEGRAM_ID":"user-api-key"}'
# ==================== Keytao GitHub Sync Scheduler ====================
# Every Wednesday and Sunday at the configured local time, the bot checks
# pending approved batches. If the count is greater than the threshold, it
# calls keytao-next to create a GitHub dictionary sync PR and posts to groups.
KEYTAO_SYNC_SCHEDULE_ENABLED=true
KEYTAO_SYNC_THRESHOLD=10
KEYTAO_SYNC_CHECK_HOUR=10
KEYTAO_SYNC_CHECK_MINUTE=0
KEYTAO_SYNC_NOTIFY_GROUP_IDS="YOUR_QQ_GROUP_ID"
# ==================== Web API (Live2D Chat Frontend) ====================
# Bearer token required by POST /api/chat and DELETE /api/chat/history.
# Must match BOT_API_KEY in keytao-next's server-side env.
# Generate with: openssl rand -hex 32
# Leave empty to disable auth (not recommended in production).
WEB_API_KEY="your-web-api-key-change-me"
# ==================== OpenAI-Compatible LLM Configuration ====================
# DeepSeek: base_url=https://api.deepseek.com, model=deepseek-v4-pro or deepseek-v4-flash
# Context Caching is enabled by default on DeepSeek (no extra config needed)
OPENAI_API_KEY="sk-your-deepseek-api-key"
OPENAI_BASE_URL="https://api.deepseek.com"
OPENAI_MODEL="deepseek-v4-pro"
OPENAI_MAX_TOKENS=1800
OPENAI_TIMEOUT=180
OPENAI_TEMPERATURE=0.7
GROUP_CONTEXT_HISTORY_MESSAGES=16
# Bot submissions run in the background, so allow deterministic source review
# to finish without inheriting the shorter admin HTTP request budget.
KEYTAO_BACKGROUND_REVIEW_AUDIT_TIMEOUT=90
# Release a stuck background add/submit operation instead of blocking the user forever.
KEYTAO_BACKGROUND_OPERATION_TIMEOUT=420
# ==================== NCM (网易云音乐) Configuration ====================
# Leave ncm_phone empty to use QR code login (will block bot startup!)
# ncm_phone=手机号
# ncm_password=密码
GITHUB_TOKEN="xxx"