File size: 1,942 Bytes
d347708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Read Agent 环境变量配置
# 复制此文件为 .env 并填写实际值

# ============ API 配置(必需) ============
# API Key(单个或多个,支持逗号分隔的多Key随机选择)
# 单个Key: OPENAI_API_KEY=sk-xxx
# 多个Key: OPENAI_API_KEY=sk-xxx1,sk-xxx2,sk-xxx3
OPENAI_API_KEY=your-api-key-here

# API 基础 URL(可选,默认值:https://api.openai.com/v1)
OPENAI_BASE_URL=https://api.openai.com/v1

# 模型名称(可选,默认值:gpt-4)
OPENAI_MODEL=gpt-4

# ============ 仓库自动下载配置 ============
# 代码目录路径(可选,默认值:./repos)
CODE_DIR=./repos

# 方式1:逗号分隔的 URL 列表
# REPO_URLS=https://github.com/user/repo1.git,https://github.com/user/repo2.git

# 方式2:带编号的配置(推荐)
# 仓库1
REPO_1_URL=https://github.com/AstrBotDevs/AstrBot-docs.git
REPO_1_NAME=AstrBot-docs  # 可选,不指定则自动从URL提取
REPO_1_BRANCH=v4          # 可选,默认 main

# 仓库2
REPO_2_URL=https://github.com/AstrBotDevs/AstrBot.git
REPO_2_NAME=AstrBot
REPO_2_BRANCH=master

# 仓库3
REPO_3_URL=https://github.com/NapNeko/NapCatQQ.git
REPO_3_NAME=NapCatQQ
REPO_3_BRANCH=main

# 启动时是否自动同步仓库(可选,默认值:true)
REPO_SYNC_ON_STARTUP=true

# ============ 其他配置 ============
# 最大步骤数(可选,默认值:10)
MAX_STEPS=10

# 预加载目录树深度(可选,默认值:3,0 表示不限制)
TREE_DEPTH=3

# 是否启用流式输出(可选,默认值:true)
STREAM_OUTPUT=true

# Web 服务器端口(可选,默认值:7860)
WEB_PORT=7860

# 调试模式(可选,默认值:false)
DEBUG=false

# ============ 重试配置 ============
# API 调用最大重试次数(可选,默认值:3)
MAX_RETRIES=3

# 重试延迟策略(可选,默认值:1,2,4,单位:秒)
RETRY_DELAYS=1,2,4