添加长期存储,流式检查
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled

This commit is contained in:
2026-04-17 01:26:05 +08:00
parent 602d551fd1
commit 404efde282
37 changed files with 794 additions and 2095 deletions

View File

@@ -25,8 +25,8 @@ vim .env # 或使用你喜欢的编辑器
- `LLAMACPP_API_KEY` - llama.cpp 服务认证 Token与容器启动参数一致默认 `token-abc123`
**可选配置项**
- `VLLM_BASE_URL` - LLM 服务地址(默认已配置为 `http://localhost:8081/v1`
- `VLLM_EMBEDDING_URL` - Embedding 服务地址(默认已配置为 `http://localhost:8082/v1`
- `VLLM_BASE_URL` - LLM 服务地址(本地默认:`http://127.0.0.1:8081/v1`Docker容器访问宿主机`http://host.docker.internal:18000/v1`
- `LLAMACPP_EMBEDDING_URL` - Embedding 服务地址(本地默认:`http://127.0.0.1:8082/v1`Docker容器访问宿主机`http://host.docker.internal:18001/v1`
- `DB_URI` - PostgreSQL 连接字符串(默认已配置,使用远程服务器地址)
- `QDRANT_URL` - Qdrant 向量数据库地址(默认已配置,使用远程服务器地址)
@@ -44,8 +44,8 @@ docker compose -f docker/docker-compose.yml up -d --build
- 访问地址:`http://your-domain.com``http://your-server-ip`
**如果未配置 Nginx直接访问容器**
- **前端**: http://localhost:8501
- **后端 API**: http://localhost:8001
- **前端**: http://127.0.0.1:8501
- **后端 API**: http://127.0.0.1:8001
#### 常用命令
@@ -95,16 +95,19 @@ vim .env
ZHIPUAI_API_KEY=your_api_key_here
LLAMACPP_API_KEY=token-abc123
# 本地开发时llama.cpp 服务在 localhost
VLLM_BASE_URL=http://localhost:8081/v1
VLLM_EMBEDDING_URL=http://localhost:8082/v1
# 本地开发时llama.cpp 服务在 127.0.0.1
VLLM_BASE_URL=http://127.0.0.1:8081/v1 # 本地开发
LLAMACPP_EMBEDDING_URL=http://127.0.0.1:8082/v1 # 本地开发
# 或
VLLM_BASE_URL=http://host.docker.internal:18000/v1 # Docker容器访问宿主机
LLAMACPP_EMBEDDING_URL=http://host.docker.internal:18001/v1 # Docker容器访问宿主机
# 数据库和向量存储使用远程服务器
DB_URI=postgresql://postgres:mysecretpassword@115.190.121.151:5432/langgraph_db?sslmode=disable
DB_URI=postgresql://postgres:huang1998@115.190.121.151:5432/langgraph_db?sslmode=disable
QDRANT_URL=http://115.190.121.151:6333
# 本地开发时,后端也在 localhost
API_URL=http://localhost:8083/chat
# 本地开发时,后端也在 127.0.0.1
API_URL=http://127.0.0.1:8083/chat
```
#### 3. 启动服务
@@ -119,7 +122,7 @@ python app/backend.py
cd frontend && streamlit run app.py
```
浏览器自动打开前端页面(如果配置了 Nginx访问 `http://your-domain.com`;否则访问 http://localhost:8501
浏览器自动打开前端页面(如果配置了 Nginx访问 `http://your-domain.com`;否则访问 http://127.0.0.1:8501
---
@@ -223,7 +226,7 @@ docker compose exec backend bash
docker compose logs -f backend
# 测试后端 API
curl http://localhost:8001/health
curl http://127.0.0.1:8001/health
```
---
@@ -249,7 +252,7 @@ curl http://localhost:8001/health
在 Gitea 仓库设置中添加:
- `ZHIPUAI_API_KEY`
- `VLLM_LOCAL_KEY`
- `LLAMACPP_API_KEY`
---