Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

19 Commits

Repository files navigation

TOPGO Platform

StarsForksLast CommitIssuesLicenseCI

GoVuePythonPostgreSQLRedisDocker

一体化 AI 资源管理平台

English | 中文


项目概述

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

核心架构

┌─────────────────────────────────────────────────────────┐
│ TOPGO Platform │
├─────────────────────────────────────────────────────────┤
│ ┌─────────────────────┐ ┌─────────────────────────┐ │
│ │ TOPGO Orchestrator │───→│ TOPGO Gateway │ │
│ │ (调度引擎) │ │ (统一网关) │ │
│ │ │ │ │ │
│ │ • 资源自动注册 │ │ • 智能路由 │ │
│ │ • 健康探测与轮转 │ │ • 精准计费 │ │
│ │ • 多维标签管理 │ │ • 用户管理 │ │
│ │ • 策略编排 │ │ • 负载均衡 │ │
│ └─────────────────────┘ └─────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
组件技术栈功能
GatewayGo + VueAPI 网关、计费、用户管理
OrchestratorPython + 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_URLPostgreSQLpostgres://...
REDIS_URLRedisredis://...
JWT_SECRETJWT 密钥自动生成
AUTO_SETUP自动初始化true

Orchestrator 环境变量

变量说明
TOPGO_GATEWAY_URLGateway API 地址
TOPGO_GATEWAY_API_KEYGateway 管理密钥
MAIL_PROVIDER邮箱服务配置

术语对照

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

文档

许可证

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


🌐 站群矩阵 · TOPGO Ecosystem

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

兄弟仓库

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

站点矩阵

#站点域名内容
1TOPGO Platformapi.miyucaicai.cnAI 资源管理与网关(本项目)
2Skill Storeskill.miyucaicai.cnAI Agent 技能商店
3TOPGO SOLARsolar.miyucaicai.cn光伏储能地图
4AI123ai123.miyucaicai.cnAI 工具导航
5TOP 门户top.miyucaicai.cn资讯门户
6AI Trendtrend.miyucaicai.cnAI 趋势资讯

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


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

About

api-token中转站,FreeSwitch Desktop 可以同时支持: 内置的轻量 FreeLLMAPI 代理(免费提供商) 可选的 TOPGO 企业后端(付费账户/计费管理) 用户配置时二选一,或混合使用。

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages