-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
75 lines (63 loc) · 2.63 KB
/
config.example.toml
File metadata and controls
75 lines (63 loc) · 2.63 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
# Kernel 配置文件模板
# 复制为 config.toml 并填入你的 token/key
[telegram]
token = "YOUR_BOT_TOKEN" # 必填;env: KERNEL_TELEGRAM_TOKEN
allowed_user = 0 # 必填:你的 TG user ID(用 @userinfobot 获取)
[general]
timezone = "Asia/Shanghai"
default_provider = "anthropic" # 启动时默认 provider
default_workspace = "." # CLI 默认 cwd,相对本文件所在目录
context_rounds = 50 # 上下文保留轮数
memory_recall_k = 5 # 长期记忆默认注入条数
data_dir = "data" # 运行时数据目录
[providers.anthropic]
type = "claude"
# api_base = "https://api.anthropic.com" # 可选:自定义 endpoint
api_key = "sk-ant-..." # env: KERNEL_PROVIDER_ANTHROPIC_API_KEY
max_tokens = 16384 # 必填(Claude Messages API 要求)
default_model = "claude-sonnet-4-5-20250929"
models = ["claude-sonnet-4-5-20250929", "claude-opus-4-6"]
# headers = { User-Agent = "Mozilla/5.0 ..." }
# [providers.openai]
# type = "openai_compat"
# api_base = "https://api.openai.com/v1"
# api_key = "sk-..." # env: KERNEL_PROVIDER_OPENAI_API_KEY
# default_model = "gpt-4o"
# models = ["gpt-4o"]
# headers = { User-Agent = "Mozilla/5.0 ..." }
# [providers.deepseek]
# type = "openai_compat"
# api_base = "https://api.deepseek.com/v1"
# api_key = "sk-..." # env: KERNEL_PROVIDER_DEEPSEEK_API_KEY
# default_model = "deepseek-chat"
# models = ["deepseek-chat"]
# headers = { User-Agent = "Mozilla/5.0 ..." }
# [titles]
# type = "openai_compat"
# api_base = "https://..."
# api_key = "sk-..." # env: KERNEL_TITLES_API_KEY
# model = "claude-haiku-4-5-20251001"
# max_tokens = 100
# headers = { User-Agent = "Mozilla/5.0 ..." }
# [stt]
# api_base = "https://api.openai.com/v1"
# api_key = "sk-..." # env: KERNEL_STT_API_KEY
# model = "whisper-1"
# headers = { User-Agent = "Mozilla/5.0 ..." }
# [tts]
# voice = "zh-CN-XiaoxiaoNeural" # edge-tts voice (free)
[cli.claude_code]
command = "claude"
args = ["-p", "--output-format", "text", "--permission-mode", "bypassPermissions"]
[cli.codex]
command = "codex"
args = ["exec", "--dangerously-bypass-approvals-and-sandbox", "--skip-git-repo-check", "--color", "never"]
# [[mcp.servers]]
# name = "exa"
# type = "http"
# url = "https://mcp.exa.ai/mcp"
# [[mcp.servers]]
# name = "context7"
# type = "http"
# url = "https://mcp.context7.com/mcp"
# headers = { CONTEXT7_API_KEY = "${CONTEXT7_API_KEY}" } # env: CONTEXT7_API_KEY