Skip to content

Commit 46626fc

Browse files
committed
Add web interface
1 parent ebffaaa commit 46626fc

13 files changed

Lines changed: 3308 additions & 0 deletions

CONFIG.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# KGCompass 配置说明
2+
3+
## 环境变量配置
4+
5+
在项目根目录创建 `.env` 文件,并设置以下环境变量:
6+
7+
```bash
8+
# GitHub Token (用于访问 GitHub API)
9+
GITHUB_TOKEN=your_github_token_here
10+
11+
# Bailian API Key (阿里云百炼大模型)
12+
BAILIAN_API_KEY=your_bailian_api_key_here
13+
14+
# Claude API Key (Anthropic Claude)
15+
CLAUDE_API_KEY=your_claude_api_key_here
16+
17+
# OpenAI API Key (GPT 模型)
18+
OPENAI_API_KEY=your_openai_api_key_here
19+
20+
# DeepSeek API Key
21+
DEEPSEEK_API_KEY=your_deepseek_api_key_here
22+
23+
# Qwen API Key
24+
QWEN_API_KEY=your_qwen_api_key_here
25+
26+
# Neo4j Configuration
27+
NEO4J_URI=bolt://neo4j:7687
28+
NEO4J_USER=neo4j
29+
NEO4J_PASSWORD=password
30+
31+
# Proxy Settings (如果需要)
32+
# http_proxy=http://172.27.16.1:7890
33+
# https_proxy=http://172.27.16.1:7890
34+
# no_proxy=localhost,127.0.0.1
35+
36+
# Debug Settings
37+
DEBUG=0
38+
FLASK_DEBUG=0
39+
```
40+
41+
## API 密钥获取
42+
43+
### GitHub Token
44+
1. 访问 https://github.com/settings/tokens
45+
2. 点击 "Generate new token"
46+
3. 选择适当的权限(repo, read:org
47+
4. 复制生成的 token
48+
49+
### Anthropic Claude
50+
1. 访问 https://console.anthropic.com/
51+
2. 创建账户并获取 API 密钥
52+
3. 复制 API 密钥
53+
54+
### OpenAI
55+
1. 访问 https://platform.openai.com/api-keys
56+
2. 创建新的 API 密钥
57+
3. 复制 API 密钥
58+
59+
### DeepSeek
60+
1. 访问 https://platform.deepseek.com/
61+
2. 注册账户并获取 API 密钥
62+
63+
### 阿里云百炼
64+
1. 访问阿里云百炼控制台
65+
2. 创建应用并获取 API 密钥
66+
67+
## Docker 配置
68+
69+
如果使用 Docker 模式,确保:
70+
71+
1. 安装 Docker 和 Docker Compose
72+
2. 如果需要 GPU 支持,安装 NVIDIA Container Toolkit
73+
3. 配置好 `.env` 文件
74+
4. 运行 `./start_web_docker.sh`
75+
76+
## 网络配置
77+
78+
如果在受限网络环境中使用,可能需要配置代理:
79+
80+
```bash
81+
export http_proxy=http://your_proxy:port
82+
export https_proxy=http://your_proxy:port
83+
export no_proxy=localhost,127.0.0.1
84+
```
85+
86+
## 故障排除
87+
88+
### Docker 相关
89+
- 确保 Docker 服务正在运行
90+
- 检查 docker-compose.yml 文件是否存在
91+
- 查看容器日志:`docker-compose logs -f`
92+
93+
### API 相关
94+
- 确保 API 密钥正确且有效
95+
- 检查网络连接和代理设置
96+
- 验证 API 配额和限制
97+
98+
### Neo4j 相关
99+
- 确保 Neo4j 容器正在运行
100+
- 检查连接字符串和认证信息
101+
- 查看 Neo4j 日志排查问题

0 commit comments

Comments
 (0)