Files
svn-log-tool/docs/README_DeepSeek.md
T

48 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SVN 日志 AI 分析(Web
## 功能说明
通过 Web 工作台上传/选择 Markdown 日志,调用 DeepSeek 或 OpenAI 兼容 API 分析并生成 Excel 工作量统计文件。
## 启动
```bash
# Docker 一键启动(推荐)
make up
```
备用方式(本机 Java + Maven):
```bash
mvn spring-boot:run -Dspring-boot.run.mainClass=com.svnlog.web.WebApplication
```
访问:`http://localhost:18088`
## 使用步骤
1. 在「SVN 日志抓取」先生成 `.md` 文件
2. 在「系统设置」选择 AI 提供商:
- `DeepSeek`:配置 DeepSeek API Key(或使用环境变量 `DEEPSEEK_API_KEY`
- `OpenAI兼容`:配置 `Base URL``API Key`、第一阶段模型、第二阶段模型
3. 在「AI 工作量分析」选择 `.md` 文件并发起分析
4. 在「任务历史」或「产物列表」下载 `.xlsx`
## DeepSeek API Key 读取优先级
1. 请求中的 `apiKey`(临时传入,优先级最高)
2. 设置页保存的运行时 `apiKey`
3. 环境变量 `DEEPSEEK_API_KEY`
> **首次启动未配置 API Key 是正常状态。**
> `/api/settings` 会返回 `apiKeyConfigured: false`
> 请前往「系统设置」页面填写 API Key 后保存,或通过环境变量注入。
## 注意事项
- 不要在源码和日志中写入真实密钥
- 使用环境变量注入密钥是更安全的做法(尤其在 Docker/CI 环境中)
- DeepSeek 模式需要可访问 DeepSeek API 的网络环境
- OpenAI 兼容模式要求兼容服务提供 `/chat/completions` 流式接口
- 接口调用可能产生费用,建议控制调用频率