Skip to content

Commit 371f717

Browse files
committed
feat: 更新环境变量配置路径
- 新增 .env.template 文件,提供环境变量配置示例 - 更新 docker-compose.yml 和相关文档,调整 .env 文件路径至项目根目录 - 修正文档中对环境变量配置的引用,确保一致性
1 parent cd45e10 commit 371f717

File tree

13 files changed

+75
-20
lines changed

13 files changed

+75
-20
lines changed
File renamed without changes.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
extra_hosts:
2323
- "host.docker.internal:host-gateway"
2424
env_file:
25-
- src/.env
25+
- .env
2626
# region api_envs
2727
environment:
2828
- HOST_IP=${HOST_IP:-}

docs/.vitepress/config.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export default defineConfig({
4444
items: [
4545
{ text: '路线图', link: '/changelog/roadmap' },
4646
{ text: '参与贡献', link: '/changelog/contributing' },
47-
{ text: '常见问题', link: '/changelog/faq' }
47+
{ text: '常见问题', link: '/changelog/faq' },
48+
{ text: '版本说明 v0.3', link: '/changelog/0.3-release-notes' }
4849
]
4950
}
5051
],
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Yuxi-Know v0.3 更新说明
2+
3+
## 概览
4+
5+
Yuxi-Know v0.3 是一个重要的里程碑版本,包含了多项架构重构、功能增强和用户体验改进。本版本重点关注了系统架构的优化、数据存储的统一管理以及用户界面的现代化改进。
6+
7+
## 🔄 重大变更 (Breaking Changes)
8+
9+
### 环境配置文件位置调整
10+
- **变更内容**: 将 `.env` 文件从 `src/.env` 移动到项目根目录 `.env`
11+
- **影响**: 需要更新配置文件的复制命令和所有相关的文档引用
12+
- **迁移指南**:
13+
```bash
14+
# 旧版本
15+
cp src/.env.template src/.env
16+
17+
# 新版本
18+
cp .env.template .env
19+
```
20+
21+
### 数据库存储架构重构
22+
- **变更内容**: 重新实现了对话管理的存储与管理,不再依赖于 MemorySaver
23+
- **影响**: 使用新的存储结构,之前存储的历史记录无法直接迁移
24+
- **改进**: 所有对话记录统一保存到 `server.db` 中,提供更好的数据一致性和查询性能
25+
26+
### 自定义模型支持移除
27+
- **变更内容**: 完全移除自定义模型支持功能
28+
- **替代方案**: 使用自定义 provider
29+
30+
## ✨ 新增功能
31+
32+
### 1. Dashboard 统计面板
33+
- **用户活跃度统计**: 提供用户使用情况的详细分析
34+
- **工具调用统计**: 实时监控各种工具的使用频率和效果
35+
- **知识库分析**: 展示知识库的使用情况和性能指标
36+
- **智能体分析**: 统计智能体的调用次数和成功率
37+
- **时间序列数据**: 支持历史趋势分析和可视化展示
38+
39+
### 2. 消息反馈系统
40+
- **点赞点踩功能**: 用户可以对 AI 回复进行质量评价
41+
- **反馈数据收集**: 为模型优化提供有价值的数据支持
42+
- **管理员视图**: 管理员可以查看整体的反馈统计情况
43+
44+
### 3. 用户资料增强
45+
- **用户名更新**: 支持用户修改显示名称
46+
- **头像管理**: 完善用户头像上传和管理功能
47+
- **账户安全**: 增强账户登录失败次数限制和锁定机制
48+
49+
### 4. 文档系统
50+
- **VitePress 集成**: 添加完整的官方文档站点
51+
- **快速开始指南**: 优化新用户的上手体验
52+
- **配置文档**: 详细的环境配置和功能说明
53+
- **GitHub Actions**: 实现文档的自动部署
54+
55+
56+
**注意**: v0.3 版本包含多项重大变更,建议在升级前仔细阅读本文档并做好数据备份。如有问题,请通过 GitHub Issues 反馈。

docs/changelog/roadmap.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
- [ ] 开发与生产环境隔离
2323
- [x] 添加统计信息
2424
- [ ] 支持 MinerU 2.5 的解析方法
25-
- [ ] Options 中添加网络搜索和绘制图片的选项,分别是用来调用工具
2625
- [x] 移除自定义模型,同时将模型的 env 修改为单环境变量的形式,移除 models.yaml 的私有共有双配置模式,除非配置了环境变量 `OVERRIDE_DEFAULT_MODELS_CONFIG_WITH` 然后指向一个变量。
2726

2827
📝 **Base**

docs/intro/knowledge-base.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LightRAG 知识库可在知识库详情中可视化,但不支持在侧边栏
2828

2929
系统默认使用 `siliconflow``Qwen/Qwen3-30B-A3B-Instruct-2507` 模型进行图谱构建。可通过环境变量自定义图谱构建模型:
3030

31-
<<< @/../src/.env.template#lightrag{bash}
31+
<<< @/../.env.template#lightrag{bash}
3232

3333

3434
## 文档管理
@@ -71,7 +71,7 @@ Neo4j 访问信息可以参考 `docker-compose.yml` 中配置对应的环境变
7171

7272
如需接入已有的 Neo4j 实例,可修改 `.env` 中的配置:
7373

74-
<<< @/../src/.env.template#neo4j{bash}
74+
<<< @/../.env.template#neo4j{bash}
7575

7676
同时记得注释掉下面的 neo4j 服务:
7777

docs/intro/model-config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
### 配置方法
1919

20-
`src/.env` 文件中添加对应的环境变量:
20+
`.env` 文件中添加对应的环境变量:
2121

22-
<<< @/../src/.env.template#model_provider{bash 2}
22+
<<< @/../.env.template#model_provider{bash 2}
2323

2424

2525
::: tip 免费获取 API Key
@@ -92,7 +92,7 @@ local-vllm:
9292
9393
### 3. 配置环境变量
9494
95-
`src/.env` 文件中添加对应的环境变量:
95+
`.env` 文件中添加对应的环境变量:
9696
```env
9797
CUSTOM_API_KEY_ENV_NAME=your_api_key_here
9898
```

docs/intro/quick-start.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ cd Yuxi-Know
2929
复制环境变量模板并编辑:
3030

3131
```bash
32-
cp src/.env.template src/.env
32+
cp .env.template .env
3333
```
3434

35-
编辑 `src/.env` 文件,配置必需的 API 密钥:
35+
编辑 `.env` 文件,配置必需的 API 密钥:
36+
37+
38+
<<< @/../.env.template#model_provider{bash 2}
3639

37-
```env
38-
# 必需配置 - 推荐使用硅基流动免费服务
39-
SILICONFLOW_API_KEY=sk-270ea********8bfa97.e3XOMd****Q1Sk
40-
```
4140

4241
::: tip 免费获取 API Key
4342
[硅基流动](https://cloud.siliconflow.cn/i/Eo5yTHGJ) 注册即送 14 元额度,支持多种开源模型。

src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from dotenv import load_dotenv
22

3-
load_dotenv("src/.env", override=True)
3+
load_dotenv(".env", override=True)
44

55
from concurrent.futures import ThreadPoolExecutor # noqa: E402
66

src/config/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(self):
5757
self.add_item("default_agent_id", default="", des="默认智能体ID")
5858
# 模型配置
5959
## 注意这里是模型名,而不是具体的模型路径,默认使用 HuggingFace 的路径
60-
## 如果需要自定义本地模型路径,则在 src/.env 中配置 MODEL_DIR
60+
## 如果需要自定义本地模型路径,则在 .env 中配置 MODEL_DIR
6161
self.add_item("model_provider", default="siliconflow", des="模型提供商", choices=list(self.model_names.keys()))
6262
self.add_item("model_name", default="zai-org/GLM-4.5", des="模型名称")
6363
self.add_item(

0 commit comments

Comments
 (0)