-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml.example
More file actions
139 lines (127 loc) · 4.23 KB
/
Copy pathconfig.yaml.example
File metadata and controls
139 lines (127 loc) · 4.23 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# ARH - AI Research Helper 配置文件
app_name: "ARH"
debug: false
command_prefix: "/"
language: "zh-CN"
# UI 主题配置
ui:
theme: "auto" # auto | dark | light | dark-daltonized | light-daltonized | dark-ansi | light-ansi
# auto: 自动检测终端主题(基于 $COLORFGBG 环境变量)
# dark: 深色主题(默认)
# light: 浅色主题
# dark-daltonized: 深色主题(色盲友好)
# light-daltonized: 浅色主题(色盲友好)
# dark-ansi: 深色主题(仅使用 16 色 ANSI 色)
# light-ansi: 浅色主题(仅使用 16 色 ANSI 色)
# LLM 配置
llm:
provider: "openai" # openai / anthropic / qwen / deepseek / ollama
api_key: "" # 建议通过环境变量 ARH_LLM_API_KEY 或 ${ARH_LLM_API_KEY} 设置
base_url: null # 自定义 API 地址(可选,支持 ${ARH_LLM_BASE_URL} 替换)
model: "gpt-3.5-turbo"
temperature: 0.7
max_tokens: 65536
# 流式 + 超时(参考 OpenHarness)
stream: true # 启用 stream=True,避免长响应撞硬 deadline
first_chunk_timeout: 120 # 从发请求到首个 chunk 到达的最大等待秒数
idle_timeout: 300 # 相邻两个 chunk 之间的最大空闲秒数
hard_deadline: 3600 # 整个请求的绝对硬上限(60 分钟)
connect_timeout: 30 # httpx 连接超时
# LLM 故障转移(参考 OpenClaw + hermes-agent)
# 当 rate_limit / overloaded / server_error / context_overflow 且重试耗尽时,
# 自动切换到 fallback_models 列表中的下一个候选
fallback:
enabled: true
fallback_models: []
# 示例(按自己可用的 provider 填):
# - "openai/gpt-4o"
# - "openai/moonshotai/kimi-k2"
# - "ollama/llama3"
cooldown_seconds: 300
# LLM 安全配置
security:
max_context_tokens: 128000
auto_compact_threshold: 100000
max_output_tokens: 4096
# 爬虫配置
crawler:
semantic_scholar_api_key: "" # 留空=无 key(速率较低但仍可用);申请: semanticscholar.org/product/api
unpaywall_email: "you@example.com" # 必需
crossref_email: "you@example.com" # 推荐
openalex_email: "you@example.com" # 可选,进入 polite pool
enabled_platforms:
- "arxiv"
- "huggingface"
- "github"
- "openreview"
arxiv_frequency: "daily"
huggingface_frequency: "daily"
github_frequency: "hourly"
keywords:
- "大语言模型"
- "计算机视觉"
- "强化学习"
incremental: true
data_retention_days: 365
# 网关配置
gateway:
enabled_channels:
- "cli"
# - "telegram" # 启用 Telegram:1) 取消注释 2) 配置下方 telegram.token
# - "feishu"
# - "wechat"
host: "127.0.0.1"
port: 8900
# 网关安全配置(参考 OpenClaw)
security:
auth_mode: "none" # none / token / password
token: ""
password: ""
rate_limit: 30
bind_mode: "loopback" # loopback / lan / auto
# Telegram 通道配置
# 启用方式:
# 1. 在 enabled_channels 加 "telegram"(即上方 gateway.enabled_channels)
# 2. 设置 token(建议用环境变量 TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN})
# 3. 安装依赖:pip install python-telegram-bot
# 4. 重启 ARH 即可
# telegram:
# token: "8786471894:AAFUh5zv433Cbz36BJkNbIQuMZhUgfvoy-w" # Bot Token(从 @BotFather 获取)
# allowed_users: [] # 允许的 Telegram user_id 列表(空=所有人)
# group_require_mention: true # 群里需要 @bot 才响应
# api_base_url: "https://api.telegram.org" # 国内可换 https://tg.example.com
# 飞书通道配置
feishu:
app_id: ""
app_secret: ""
verification_token: ""
group_require_mention: false
# 微信通道配置
wechat:
app_id: ""
app_secret: ""
token: ""
webhook_mode: false
# 数据库配置
database:
engine: "sqlite" # sqlite / mysql / postgresql
sqlite_path: "data/arh.db"
url: null
wal_mode: true # 启用 SQLite WAL 模式(参考 AstrBot)
# Redis 缓存配置
redis:
enabled: false
url: "redis://localhost:6379/0"
# 插件配置
plugin:
enabled:
- "help"
- "daily_push"
disabled: []
extra_dirs: []
# 记忆系统配置(参考 Claude Code)
memory:
dir: "data/memory"
max_index_lines: 200
auto_extract: true
extract_interval_turns: 10