Skip to content

Latest commit

 

History

History
202 lines (156 loc) · 7.88 KB

File metadata and controls

202 lines (156 loc) · 7.88 KB

TOPGO Platform

Stars Forks Last Commit Issues License CI

Go Vue Python PostgreSQL Redis Docker

一体化 AI 资源管理平台

English | 中文


项目概述

TOPGO Platform 是企业级一体化 AI 资源管理平台,整合了 智能调度引擎统一API网关 两大核心组件,为企业提供完整的 AI 资源供给与管理解决方案。

核心架构

┌─────────────────────────────────────────────────────────┐
│                   TOPGO Platform                        │
├─────────────────────────────────────────────────────────┤
│  ┌─────────────────────┐    ┌─────────────────────────┐ │
│  │  TOPGO Orchestrator │───→│   TOPGO Gateway        │ │
│  │    (调度引擎)       │    │     (统一网关)          │ │
│  │                     │    │                         │ │
│  │ • 资源自动注册      │    │ • 智能路由              │ │
│  │ • 健康探测与轮转    │    │ • 精准计费              │ │
│  │ • 多维标签管理      │    │ • 用户管理              │ │
│  │ • 策略编排          │    │ • 负载均衡              │ │
│  └─────────────────────┘    └─────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
组件 技术栈 功能
Gateway Go + Vue API 网关、计费、用户管理
Orchestrator Python + Vue 资源调度、轮转、同步

快速部署

Docker Compose (推荐)

# 克隆项目
git clone https://gitee.com/anbeime/api-token.git
cd api-token

# 启动完整平台 (Gateway + Orchestrator)
docker compose up -d

访问 http://localhost:8080 (Gateway) 和 http://localhost:8787 (Orchestrator)

分别部署

Gateway (API 网关):

cd backend
docker compose up -d

Orchestrator (调度引擎):

cd orchestrator
docker compose up -d

核心功能

TOPGO Gateway (统一API网关)

  • 多模型支持 - Claude、OpenAI (Codex)、Gemini
  • 资源凭证管理 - OAuth、API Key
  • 精准计费 - 用量级别追踪
  • 智能路由 - 基于 GEO 的动态路由
  • 用户管理 - API Key、套餐、充值

TOPGO Orchestrator (智能调度引擎)

  • 自动注册 - 自动创建 AI 账号
  • 智能轮转 - 按可用量自动调度
  • 健康探测 - 实时监控资源状态
  • 策略编排 - 多维度路由策略
  • Gateway 同步 - 自动推送资源到网关

资源供给流程

1. [Orchestrator] 自动注册/管理 AI 资源
         ↓
2. [Orchestrator] 探测资源健康度,打标签
         ↓
3. [Orchestrator] 同步资源到 Gateway
         ↓
4. [Gateway] 接收资源,提供 API 服务
         ↓
5. [用户] 通过 API Key 调用 AI 服务

项目结构

api-token/
├── backend/              # TOPGO Gateway (Go)
│   ├── cmd/server/       # 主入口
│   ├── internal/         # 核心逻辑
│   ├── frontend/         # Vue 前端
│   └── deploy/           # 部署配置
│
├── orchestrator/         # TOPGO Orchestrator (Python)
│   ├── src/              # 核心逻辑
│   ├── web/              # Vue 前端
│   └── docs/             # 文档
│
├── docs/                 # 公共文档
├── deploy/               # 公共部署配置
└── docker-compose.yml    # 一体化部署

环境配置

Gateway 环境变量

变量 说明 默认值
DATABASE_URL PostgreSQL postgres://...
REDIS_URL Redis redis://...
JWT_SECRET JWT 密钥 自动生成
AUTO_SETUP 自动初始化 true

Orchestrator 环境变量

变量 说明
TOPGO_GATEWAY_URL Gateway API 地址
TOPGO_GATEWAY_API_KEY Gateway 管理密钥
MAIL_PROVIDER 邮箱服务配置

术语对照

旧术语 新术语
账号 资源实例
订阅 资源包
额度 可用量
轮转 资源调度
拼车 资源池

文档

许可证

GNU Lesser General Public License v3.0 (LGPL-3.0)


🌐 站群矩阵 · TOPGO Ecosystem

TOPGO Platform 是 *.miyucaicai.cn 同主域生态的 AI 资源调度中枢,与以下兄弟项目协同:

兄弟仓库

# 仓库 定位 链接
1 api-token TOPGO Platform · AI 资源管理与 GEO 智能路由(本仓库) github.com/anbeime/api-token
2 skill AI Agent 技能商店 · 收录 240+ 个官方/中文技能 github.com/anbeime/skill
3 solar TOPGO SOLAR · 光伏储能地图站 github.com/anbeime/solar
4 ai123 AI 工具站 · 工具导航与教程 github.com/anbeime/ai123
5 top TOP 资讯门户 · 行业头条聚合 github.com/anbeime/top
6 ai-trend-publish AI 趋势发布 · 自动化资讯采集 github.com/anbeime/ai-trend-publish

站点矩阵

# 站点 域名 内容
1 TOPGO Platform api.miyucaicai.cn AI 资源管理与网关(本项目)
2 Skill Store skill.miyucaicai.cn AI Agent 技能商店
3 TOPGO SOLAR solar.miyucaicai.cn 光伏储能地图
4 AI123 ai123.miyucaicai.cn AI 工具导航
5 TOP 门户 top.miyucaicai.cn 资讯门户
6 AI Trend trend.miyucaicai.cn AI 趋势资讯

所有站点统一使用 *.miyucaicai.cn 主域,共享 GEO 智能路由、统一品牌与互链策略。


TOPGO Platform - 您的企业级 AI 资源管理解决方案