overview.json 15.8 KB
{
  "project": "llm-call-platform",
  "version": "1.0",
  "date": "2026-06-11",
  "review_status": "已确认",
  "status_badge": "confirmed",
  "scheme_rows": "<tr class=\"row-confirmed\">\n  <td><span class=\"tech-id\">T-01</span></td>\n  <td>Web 管理控制台</td>\n  <td>基于 React 的管理界面,提供模型调用配置、调用监控、日志查看、统计面板等</td>\n  <td>React · Vite · Ant Design · Zustand</td>\n  <td><span class=\"badge badge-confirmed\">已确认</span></td>\n  <td><a href=\"T-01-web-console.html\" class=\"detail-link\">详情 →</a></td>\n</tr>\n<tr class=\"row-confirmed\">\n  <td><span class=\"tech-id\">T-02</span></td>\n  <td>核心 API 服务</td>\n  <td>FastAPI REST API 服务,LLM 调用入口,同步/异步任务编排,调用策略调度</td>\n  <td>Python · FastAPI · SQLAlchemy · JWT</td>\n  <td><span class=\"badge badge-confirmed\">已确认</span></td>\n  <td><a href=\"T-02-core-api.html\" class=\"detail-link\">详情 →</a></td>\n</tr>\n<tr class=\"row-confirmed\">\n  <td><span class=\"tech-id\">T-03</span></td>\n  <td>LLM 适配引擎</td>\n  <td>策略模式适配多 LLM 供应商,支持重试/降级/限流/超时可配置调用策略</td>\n  <td>Python · 策略模式 · HTTP SDK</td>\n  <td><span class=\"badge badge-confirmed\">已确认</span></td>\n  <td><a href=\"T-03-llm-adapter.html\" class=\"detail-link\">详情 →</a></td>\n</tr>\n<tr class=\"row-confirmed\">\n  <td><span class=\"tech-id\">T-04</span></td>\n  <td>异步任务调度器</td>\n  <td>Celery 分布式任务队列,处理异步 LLM 调用任务</td>\n  <td>Celery · Redis · Python</td>\n  <td><span class=\"badge badge-confirmed\">已确认</span></td>\n  <td><a href=\"T-04-async-scheduler.html\" class=\"detail-link\">详情 →</a></td>\n</tr>\n<tr class=\"row-confirmed\">\n  <td><span class=\"tech-id\">T-05</span></td>\n  <td>数据存储层</td>\n  <td>MySQL + Redis 数据持久化,结构化调用日志与原始文件日志混合存储</td>\n  <td>MySQL · Redis · SQLAlchemy</td>\n  <td><span class=\"badge badge-confirmed\">已确认</span></td>\n  <td><a href=\"T-05-data-storage.html\" class=\"detail-link\">详情 →</a></td>\n</tr>",
  "interaction_svg": "<div class=\"diagram-container\">\n  <svg viewBox=\"0 0 950 480\" xmlns=\"http://www.w3.org/2000/svg\" class=\"interaction-svg\">\n    <defs>\n      <marker id=\"arrow\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n        <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#94a3b8\"/>\n      </marker>\n      <marker id=\"arrow-purple\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n        <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#c084fc\"/>\n      </marker>\n    </defs>\n    <rect x=\"380\" y=\"10\" width=\"190\" height=\"70\" rx=\"8\" class=\"node-box node-t01\"/>\n    <text x=\"475\" y=\"40\" text-anchor=\"middle\" class=\"node-title\">T-01 Web 管理控制台</text>\n    <text x=\"475\" y=\"60\" text-anchor=\"middle\" class=\"node-subtitle\">React + Ant Design</text>\n    <rect x=\"380\" y=\"130\" width=\"190\" height=\"70\" rx=\"8\" class=\"node-box node-t02\"/>\n    <text x=\"475\" y=\"160\" text-anchor=\"middle\" class=\"node-title\">T-02 核心 API 服务</text>\n    <text x=\"475\" y=\"180\" text-anchor=\"middle\" class=\"node-subtitle\">FastAPI + SQLAlchemy</text>\n    <rect x=\"140\" y=\"240\" width=\"190\" height=\"70\" rx=\"8\" class=\"node-box node-t03\"/>\n    <text x=\"235\" y=\"270\" text-anchor=\"middle\" class=\"node-title\">T-03 LLM 适配引擎</text>\n    <text x=\"235\" y=\"290\" text-anchor=\"middle\" class=\"node-subtitle\">策略模式</text>\n    <rect x=\"620\" y=\"240\" width=\"190\" height=\"70\" rx=\"8\" class=\"node-box node-t04\"/>\n    <text x=\"715\" y=\"270\" text-anchor=\"middle\" class=\"node-title\">T-04 异步任务调度器</text>\n    <text x=\"715\" y=\"290\" text-anchor=\"middle\" class=\"node-subtitle\">Celery + Redis</text>\n    <rect x=\"380\" y=\"370\" width=\"190\" height=\"70\" rx=\"8\" class=\"node-box node-t05\"/>\n    <text x=\"475\" y=\"400\" text-anchor=\"middle\" class=\"node-title\">T-05 数据存储层</text>\n    <text x=\"475\" y=\"420\" text-anchor=\"middle\" class=\"node-subtitle\">MySQL + Redis</text>\n    <rect x=\"0\" y=\"130\" width=\"90\" height=\"70\" rx=\"8\" class=\"node-box node-external\"/>\n    <text x=\"45\" y=\"160\" text-anchor=\"middle\" class=\"node-title\">外部系统</text>\n    <text x=\"45\" y=\"180\" text-anchor=\"middle\" class=\"node-subtitle\">第三方</text>\n    <rect x=\"780\" y=\"130\" width=\"90\" height=\"70\" rx=\"8\" class=\"node-box node-external\"/>\n    <text x=\"825\" y=\"155\" text-anchor=\"middle\" class=\"node-title\">模型 API</text>\n    <text x=\"825\" y=\"175\" text-anchor=\"middle\" class=\"node-subtitle\">GLM/Qwen/... </text>\n    <line x1=\"475\" y1=\"80\" x2=\"475\" y2=\"125\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"490\" y=\"108\" text-anchor=\"start\" class=\"edge-label\">I-02 HTTP REST</text>\n    <line x1=\"475\" y1=\"200\" x2=\"330\" y2=\"240\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"380\" y=\"225\" text-anchor=\"start\" class=\"edge-label\">I-03 SDK</text>\n    <line x1=\"475\" y1=\"200\" x2=\"715\" y2=\"235\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"530\" y=\"225\" text-anchor=\"start\" class=\"edge-label\">I-05 Celery</text>\n    <line x1=\"715\" y1=\"310\" x2=\"425\" y2=\"240\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"560\" y=\"295\" text-anchor=\"start\" class=\"edge-label\">I-06 SDK</text>\n    <line x1=\"235\" y1=\"310\" x2=\"235\" y2=\"370\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"250\" y=\"345\" text-anchor=\"start\" class=\"edge-label\">I-07 DB</text>\n    <line x1=\"715\" y1=\"310\" x2=\"715\" y2=\"370\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"700\" y=\"345\" text-anchor=\"end\" class=\"edge-label\">I-07 DB</text>\n    <line x1=\"475\" y1=\"200\" x2=\"475\" y2=\"365\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"490\" y=\"290\" text-anchor=\"start\" class=\"edge-label\">I-07 SQLAlchemy</text>\n    <line x1=\"90\" y1=\"165\" x2=\"375\" y2=\"165\" class=\"edge\" marker-end=\"url(#arrow)\"/>\n    <text x=\"230\" y=\"158\" text-anchor=\"middle\" class=\"edge-label\">I-08 HTTP REST</text>\n    <line x1=\"235\" y1=\"310\" x2=\"780\" y2=\"175\" class=\"edge arrow-purple\" marker-end=\"url(#arrow-purple)\"/>\n    <text x=\"530\" y=\"320\" text-anchor=\"start\" class=\"edge-label edge-label-purple\">I-04 HTTP</text>\n  </svg>\n</div>",
  "interaction_rows": "<tr>\n  <td><span class=\"interaction-id\">I-01</span></td>\n  <td>用户浏览器</td>\n  <td>T-01</td>\n  <td><span class=\"interaction-type\">HTTP</span></td>\n  <td>用户通过浏览器访问 Web 管理控制台</td>\n</tr>\n<tr>\n  <td><span class=\"interaction-id\">I-02</span></td>\n  <td>T-01</td>\n  <td>T-02</td>\n  <td><span class=\"interaction-type\">HTTP REST</span></td>\n  <td>前端通过 REST API 调用后端进行模型调用、查询统计数据</td>\n</tr>\n<tr>\n  <td><span class=\"interaction-id\">I-03</span></td>\n  <td>T-02</td>\n  <td>T-03</td>\n  <td><span class=\"interaction-type\">SDK 调用</span></td>\n  <td>API 服务通过 LLM 适配引擎工厂创建模型适配器,发起同步/异步调用</td>\n</tr>\n<tr>\n  <td><span class=\"interaction-id\">I-04</span></td>\n  <td>T-03</td>\n  <td>模型 API</td>\n  <td><span class=\"interaction-type\">HTTP</span></td>\n  <td>适配引擎通过 HTTP 请求调用各模型厂商的 API(GLM-4/Qwen/Baidu 等)</td>\n</tr>\n<tr>\n  <td><span class=\"interaction-id\">I-05</span></td>\n  <td>T-02</td>\n  <td>T-04</td>\n  <td><span class=\"interaction-type\">消息队列</span></td>\n  <td>提交异步 LLM 调用任务到 Celery 任务队列</td>\n</tr>\n<tr>\n  <td><span class=\"interaction-id\">I-06</span></td>\n  <td>T-04</td>\n  <td>T-03</td>\n  <td><span class=\"interaction-type\">SDK 调用</span></td>\n  <td>Celery Worker 在处理异步任务时调用 LLM 适配引擎执行模型请求</td>\n</tr>\n<tr>\n  <td><span class=\"interaction-id\">I-07</span></td>\n  <td>T-02 / T-04</td>\n  <td>T-05</td>\n  <td><span class=\"interaction-type\">SQLAlchemy / Redis</span></td>\n  <td>API 服务和 Celery Worker 通过 SQLAlchemy 读写 MySQL,通过 Redis 操作缓存/计数器</td>\n</tr>\n<tr>\n  <td><span class=\"interaction-id\">I-08</span></td>\n  <td>外部系统</td>\n  <td>T-02</td>\n  <td><span class=\"interaction-type\">HTTP REST</span></td>\n  <td>第三方系统通过 REST API 调用平台的模型能力</td>\n</tr>",
  "folder_tree": "<div class=\"tree\">\n  <div class=\"tree-item\">📁 llm-call-platform/ <span class=\"tree-comment\">项目根目录</span></div>\n  <div class=\"tree-children\">\n    <div class=\"tree-item\">📁 frontend/ <span class=\"tree-comment\">T-01 React 前端应用</span></div>\n    <div class=\"tree-children\">\n      <div class=\"tree-item\">📁 public/ <span class=\"tree-comment\">静态资源</span></div>\n      <div class=\"tree-item\">📁 src/</div>\n      <div class=\"tree-children\">\n        <div class=\"tree-item\">📁 pages/ <span class=\"tree-comment\">页面组件(监控面板/模型配置/调用日志/统计报表)</span></div>\n        <div class=\"tree-item\">📁 components/ <span class=\"tree-comment\">公共组件</span></div>\n        <div class=\"tree-item\">📁 hooks/ <span class=\"tree-comment\">自定义 Hooks</span></div>\n        <div class=\"tree-item\">📁 services/ <span class=\"tree-comment\">API 请求层</span></div>\n        <div class=\"tree-item\">📁 stores/ <span class=\"tree-comment\">Zustand 状态管理</span></div>\n        <div class=\"tree-item\">📁 types/ <span class=\"tree-comment\">TypeScript 类型定义</span></div>\n        <div class=\"tree-item\">📁 utils/ <span class=\"tree-comment\">工具函数</span></div>\n        <div class=\"tree-item\">📄 App.tsx <span class=\"tree-comment\">根组件</span></div>\n        <div class=\"tree-item\">📄 main.tsx <span class=\"tree-comment\">应用入口</span></div>\n      </div>\n      <div class=\"tree-item\">📄 package.json</div>\n      <div class=\"tree-item\">📄 vite.config.ts</div>\n      <div class=\"tree-item\">📄 Dockerfile <span class=\"tree-comment\">Nginx 容器化构建</span></div>\n    </div>\n    <div class=\"tree-item\">📁 backend/ <span class=\"tree-comment\">T-02 FastAPI 后端 + T-03 LLM 适配 + T-04 Celery 任务</span></div>\n    <div class=\"tree-children\">\n      <div class=\"tree-item\">📁 app/</div>\n      <div class=\"tree-children\">\n        <div class=\"tree-item\">📁 api/ <span class=\"tree-comment\">REST 路由(按业务模块分文件)</span></div>\n        <div class=\"tree-item\">📁 models/ <span class=\"tree-comment\">SQLAlchemy ORM 数据模型</span></div>\n        <div class=\"tree-item\">📁 schemas/ <span class=\"tree-comment\">Pydantic 请求/响应模型</span></div>\n        <div class=\"tree-item\">📁 services/ <span class=\"tree-comment\">业务逻辑层</span></div>\n        <div class=\"tree-children\">\n          <div class=\"tree-item\">📁 llm/ <span class=\"tree-comment\">T-03 LLM 适配引擎</span></div>\n          <div class=\"tree-children\">\n            <div class=\"tree-item\">📁 adapters/ <span class=\"tree-comment\">各模型适配器(GLM/Qwen/Baidu/Custom)</span></div>\n            <div class=\"tree-item\">📁 strategies/ <span class=\"tree-comment\">调用策略(重试/降级/限流/超时)</span></div>\n            <div class=\"tree-item\">📄 factory.py <span class=\"tree-comment\">适配器工厂</span></div>\n            <div class=\"tree-item\">📄 base.py <span class=\"tree-comment\">基础适配器接口</span></div>\n          </div>\n          <div class=\"tree-item\">📄 call_service.py <span class=\"tree-comment\">模型调用编排服务</span></div>\n          <div class=\"tree-item\">📄 statistics_service.py <span class=\"tree-comment\">调用统计服务</span></div>\n        </div>\n        <div class=\"tree-item\">📁 core/ <span class=\"tree-comment\">核心配置(配置读取/JWT 认证/依赖注入)</span></div>\n        <div class=\"tree-item\">📁 db/ <span class=\"tree-comment\">数据库会话与迁移(Alembic)</span></div>\n        <div class=\"tree-item\">📄 main.py <span class=\"tree-comment\">FastAPI 应用入口</span></div>\n      </div>\n      <div class=\"tree-item\">📁 tasks/ <span class=\"tree-comment\">T-04 Celery 异步任务定义</span></div>\n      <div class=\"tree-item\">📁 tests/ <span class=\"tree-comment\">测试用例</span></div>\n      <div class=\"tree-children\">\n        <div class=\"tree-item\">📁 api/</div>\n        <div class=\"tree-item\">📁 services/</div>\n        <div class=\"tree-item\">📄 conftest.py</div>\n      </div>\n      <div class=\"tree-item\">📁 logs/ <span class=\"tree-comment\">日志文件(本地开发用,不提交)</span></div>\n      <div class=\"tree-item\">📄 .env <span class=\"tree-comment\">敏感环境变量(不提交)</span></div>\n      <div class=\"tree-item\">📄 config.yaml <span class=\"tree-comment\">业务/应用配置</span></div>\n      <div class=\"tree-item\">📄 requirements.txt</div>\n      <div class=\"tree-item\">📄 Dockerfile <span class=\"tree-comment\">Python 容器化构建</span></div>\n      <div class=\"tree-item\">📄 celery_app.py <span class=\"tree-comment\">Celery 应用实例</span></div>\n    </div>\n    <div class=\"tree-item\">📄 docker-compose.yml <span class=\"tree-comment\">容器编排(前端/后端/Celery/Redis/MySQL)</span></div>\n    <div class=\"tree-item\">📄 .gitignore</div>\n  </div>\n</div>",
  "schemes": [
    {"id": "T-01", "fileKey": "web-console"},
    {"id": "T-02", "fileKey": "core-api"},
    {"id": "T-03", "fileKey": "llm-adapter"},
    {"id": "T-04", "fileKey": "async-scheduler"},
    {"id": "T-05", "fileKey": "data-storage"}
  ],
  "index": {
    "title": "1. 技术方案设计",
    "icon": "🏗️",
    "date": "2026-06-11",
    "files": [
      {"href": "1-tech-implementation-plan/overview.html", "name": "overview.html", "desc": "方案总览 + 交互关系 + 文件夹结构"},
      {"href": "1-tech-implementation-plan/T-01-web-console.html", "name": "T-01-web-console.html", "desc": "Web 管理控制台详细方案"},
      {"href": "1-tech-implementation-plan/T-02-core-api.html", "name": "T-02-core-api.html", "desc": "核心 API 服务详细方案"},
      {"href": "1-tech-implementation-plan/T-03-llm-adapter.html", "name": "T-03-llm-adapter.html", "desc": "LLM 适配引擎详细方案"},
      {"href": "1-tech-implementation-plan/T-04-async-scheduler.html", "name": "T-04-async-scheduler.html", "desc": "异步任务调度器详细方案"},
      {"href": "1-tech-implementation-plan/T-05-data-storage.html", "name": "T-05-data-storage.html", "desc": "数据存储层详细方案"}
    ]
  },
  "allCategories": [
    {
      "title": "1. 技术方案设计",
      "icon": "🏗️",
      "date": "2026-06-11",
      "files": [
        {"href": "1-tech-implementation-plan/overview.html", "name": "overview.html", "desc": "方案总览 + 交互关系 + 文件夹结构"},
        {"href": "1-tech-implementation-plan/T-01-web-console.html", "name": "T-01-web-console.html", "desc": "Web 管理控制台详细方案"},
        {"href": "1-tech-implementation-plan/T-02-core-api.html", "name": "T-02-core-api.html", "desc": "核心 API 服务详细方案"},
        {"href": "1-tech-implementation-plan/T-03-llm-adapter.html", "name": "T-03-llm-adapter.html", "desc": "LLM 适配引擎详细方案"},
        {"href": "1-tech-implementation-plan/T-04-async-scheduler.html", "name": "T-04-async-scheduler.html", "desc": "异步任务调度器详细方案"},
        {"href": "1-tech-implementation-plan/T-05-data-storage.html", "name": "T-05-data-storage.html", "desc": "数据存储层详细方案"}
      ]
    }
  ]
}