docs: complete ai platform demo milestone

This commit is contained in:
hailin
2026-07-14 14:13:40 +08:00
parent 77def70983
commit f8b6705bec
6 changed files with 112 additions and 22 deletions

View File

@@ -8,12 +8,27 @@
## First Run
```bash
copy .env.example .env
```powershell
Copy-Item .env.example .env
python -c "import base64,secrets; print(base64.urlsafe_b64encode(secrets.token_bytes(32)).decode())"
```
将输出写入 `.env` 的 `AI_CREDENTIAL_ENCRYPTION_KEY`。该值缺失时,系统会拒绝保存模型渠道凭证;已经保存凭证后不要随意更换主密钥。
完整应用(PostgreSQL、Redis、MinIO、Django、Celery worker、Celery Beat、React):
```powershell
cd infra
docker compose --env-file ../.env up --build
```
只启动本地基础设施、在宿主机运行前后端时:
```powershell
cd infra
docker compose -f docker-compose.local.yml --env-file ../.env up -d
```
首次启动时,backend 容器会自动等待 PostgreSQL、执行数据库迁移,并初始化企业后台治理数据。
Backend:
@@ -44,10 +59,28 @@ pytest -v
```bash
cd frontend
npm install
npm run test:run
npm run lint
npm run typecheck
npm run build
```
## AI Platform Demo
1. 使用管理员账号打开 `#/modelhub/providers`,创建 OpenAI-compatible 渠道和文本模型,并执行异步连通测试。
2. 取得模型配置 ID 后创建预置草稿:
```powershell
cd backend
python manage.py seed_ai_demo --deployment-id 1
```
3. 在 `#/skills` 检查、编辑并发布三个 Skill。
4. 在 `#/agents` 编辑技术支持分析 Agent 的模型、步骤和输入映射,先运行草稿沙箱,再发布并运行正式版本。
5. 在 `#/agent-runs` 查看执行脊柱、每步输入输出、调用尝试、Token、耗时和配置快照。
完整验收步骤见 [AI 平台配置演示版验收](ai-platform-demo-acceptance.md)。
## Stage 1 API Smoke Tests
- Tickets: `GET http://localhost:8000/api/tickets`