From 4355e455809e5dc1d9b373ec00dd071754b5377e Mon Sep 17 00:00:00 2001 From: liuguancen Date: Thu, 2 Apr 2026 11:37:53 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=87=E6=A1=A3]=20=E6=9B=B4=E6=96=B0README?= =?UTF-8?q?=EF=BC=9A=E9=A1=B9=E7=9B=AE=E4=BB=8B=E7=BB=8D=E3=80=81=E6=9E=B6?= =?UTF-8?q?=E6=9E=84=E3=80=81=E5=BF=AB=E9=80=9F=E5=90=AF=E5=8A=A8=E3=80=81?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aa1e7cb..92fd8ec 100644 --- a/README.md +++ b/README.md @@ -1 +1,94 @@ -# gangyan +# 钢研院智能问答平台(gangyan) + +面向冶金行业的 LLM 智能问答系统,提供智能对话、文档撰写、知识库管理、文献检索、翻译等功能。 + +## 系统架构 + +``` +Vue前端(:3000/metalinfo) + │ proxy /chat_web_backend + ▼ +Java后端(:8099/chat_web_backend) ──→ Python RAG(:7861) + │ │ + ├── MySQL(:33306) ├── Milvus(:19530) + ├── Redis(:6379) ├── Embedding API(bge-m3) + └── 科协SSO └── LLM API(deepseek-v3等) +``` + +## 模块说明 + +| 模块 | 路径 | 技术栈 | 说明 | +|------|------|--------|------| +| 前端 | `chat_web_front/` | Vue 3 + TypeScript + Element Plus + Vite | 用户界面 | +| Java 后端 | `chat_web_backend/` | Spring Boot 2.3.7 + MyBatis-Plus + JDK 11 | 业务 API | +| Python RAG | `langchain-chat/` | Python 3.11 + FastAPI + LangChain | LLM 推理 + 知识库检索 | + +## 功能模块 + +- **智能对话** — 多模型对话(DeepSeek、Qwen 等),支持流式响应、知识库增强问答 +- **文档撰写** — AI 生成大纲与正文,支持改写、润色、扩写、续写 +- **知识库管理** — 个人知识库,文件上传、文章综述、章节速览、文件对话 +- **文献检索** — 政策库、报告库、期刊论文库、冶金行业系列知识库 +- **翻译** — 文档翻译、文本翻译,多语种支持 +- **应用广场** — 智慧场景、助手收藏 + +## 基础设施 + +| 服务 | 端口 | 部署方式 | +|------|------|----------| +| MySQL 8.4.4 | 33306 | Docker Compose (`mysql/docker-compose.yml`) | +| Redis | 6379 | 宿主机 / Docker | +| Milvus 2.6.4 | 19530 | Docker Compose (`milvus/docker-compose.yml`) | +| MinIO | 9002/9003 | Docker(Milvus 依赖) | + +## 快速启动 + +```bash +cd /opt/download/oss_files/gangyan-deploy/gangyan + +# 1. 启动数据层 +cd mysql/mysql-8.4.4 && docker compose up -d && cd ../.. +docker start redis-server 2>/dev/null || docker run -d --name redis-server -p 6379:6379 redis:7-alpine +cd milvus && docker compose up -d && cd .. + +# 2. 启动 Java 后端 +sudo bash backend/start_local.sh + +# 3. 启动 Python RAG +source /opt/software/miniconda3/etc/profile.d/conda.sh && conda activate langchain-chat +cd langchain-chat && nohup python startup.py --all-api > langchain.log 2>&1 & + +# 4. 启动前端 +cd chat_web_front && npm run dev +``` + +或一键启动:`bash start_all.sh` + +## 健康检查 + +```bash +curl -s -o /dev/null -w "Java %{http_code}\n" http://127.0.0.1:8099/chat_web_backend/app/user +curl -s -o /dev/null -w "Langchain %{http_code}\n" http://127.0.0.1:7861/docs +curl -s -o /dev/null -w "Frontend %{http_code}\n" http://127.0.0.1:3000/ +``` + +## 项目结构 + +``` +gangyan/ +├── chat_web_front/ # Vue 3 前端 +├── chat_web_backend/ # Java Spring Boot 后端 +├── langchain-chat/ # Python RAG 服务 +├── backend/ # 后端部署(jar + 启动脚本) +├── mysql/ # MySQL Docker Compose + 数据 +├── milvus/ # Milvus Docker Compose + 数据 +├── scripts/ # 各服务运维脚本 +├── docs/ # 项目文档 +├── logs/ # 运行日志 +├── .harness/ # Agent 协同开发上下文 +└── start_all.sh # 一键启动脚本 +``` + +## Agent 协同开发 + +`.harness/` 目录包含 Agent 协同开发所需的项目上下文文件,详见 [.harness/CLAUDE.md](.harness/CLAUDE.md)。