docs: 更新文档路径引用,移除硬编码密钥,修复 Docker 配置
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 7m1s

This commit is contained in:
2026-04-22 00:43:06 +08:00
parent 38646001e6
commit a869d884b7
7 changed files with 125 additions and 90 deletions

View File

@@ -106,7 +106,7 @@ VLLM_BASE_URL=http://127.0.0.1:8081/v1
LLAMACPP_EMBEDDING_URL=http://127.0.0.1:8082/v1
# 远程数据库和向量存储
DB_URI=postgresql://postgres:huang1998@115.190.121.151:5432/langgraph_db?sslmode=disable
DB_URI=postgresql://postgres:your_password_here@115.190.121.151:5432/langgraph_db?sslmode=disable
QDRANT_URL=http://115.190.121.151:6333
# 日志和调试
@@ -119,12 +119,17 @@ MEMORY_SUMMARIZE_INTERVAL=10
**终端 1 - 后端:**
```bash
python app/backend.py
python backend/app/backend.py
```
**终端 2 - 前端:**
```bash
streamlit run frontend/frontend_main.py
streamlit run frontend/src/frontend_main.py
```
或者使用启动脚本(推荐):
```bash
./scripts/start.sh both
```
浏览器自动打开前端页面,访问 http://127.0.0.1:8501
@@ -137,9 +142,9 @@ streamlit run frontend/frontend_main.py
| 文件 | 用途 |
|------|------|
| `docker-compose.yml` | 服务编排配置(包含 backend 和 frontend |
| `Dockerfile.backend` | 后端镜像构建 |
| `Dockerfile.frontend` | 前端镜像构建 |
| `docker/docker-compose.yml` | 服务编排配置(包含 backend 和 frontend |
| `docker/backend/Dockerfile` | 后端镜像构建 |
| `docker/frontend/Dockerfile` | 前端镜像构建 |
| `.gitea/workflows/deploy.yml` | CI/CD 自动化部署 |
### docker-compose.yml 结构
@@ -173,7 +178,7 @@ docker compose up -d frontend
### 添加新工具
在 [app/graph/graph_tools.py](file:///home/huang/Study/AIProject/Agent1/app/graph/graph_tools.py) 中添加:
在 [backend/app/graph/graph_tools.py](file:///home/huang/Study/AIProject/Agent1/backend/app/graph/graph_tools.py) 中添加:
```python
@tool
@@ -195,7 +200,7 @@ def my_new_tool(param: str) -> str:
### 添加新模型
在 [app/agent/llm_factory.py](file:///home/huang/Study/AIProject/Agent1/app/agent/llm_factory.py) 中:
在 [backend/app/agent/llm_factory.py](file:///home/huang/Study/AIProject/Agent1/backend/app/agent/llm_factory.py) 中:
```python
@staticmethod