Skip to main content

sagellm-workstation

私有化 AI 工作站 — 基于 sagellm-gateway 的一键 Web 界面。

🛡️ 数据不出境 · 完全本地推理 · 零编程门槛


✨ 功能

  • 实时流式对话 — 接入任意 sagellm-gateway(OpenAI 兼容接口)
  • 实时监控面板 — TPS、首 Token 延迟、GPU 利用率、显存趋势图
  • 白牌化 — 品牌名 / Logo / 主题色可通过 config.ini 配置,无需改代码
  • "数据不出境 · 国产算力" 徽章 — 一眼打动甲方客户
  • 零前端构建 — 纯 Python + 单 HTML 文件,无 Docker / Node.js 依赖

🚀 快速开始

前提

  • Python 3.10+(conda / 系统 Python 均可)
  • 已运行的 sagellm-gateway(默认 http://localhost:8080)

Windows 用户

双击 start.bat 即可,浏览器自动打开。

Linux / macOS 用户

./start.sh

手动启动

pip install -r requirements.txt
python server.py

浏览器访问 http://localhost:3000


⚙️ 配置

编辑 config.ini(可用记事本打开):

[server]
port = 3000          ; 工作站监听端口

[sagellm]
base_url      = http://localhost:8080   ; gateway 地址
api_key       = not-required
default_model = default
backend_type  = Ascend NPU              ; 徽章展示标签

[brand]
name         = SageLLM 工作站
accent_color = #6366f1                  ; 主题色(任意 Hex)
logo_path    =                          ; Logo 文件路径(留空用默认图标)

🔌 与 sagellm-gateway 对接

前端路由 上游接口 说明
POST /api/chat POST /v1/chat/completions 流式对话(SSE 透传)
GET /api/models GET /v1/models 模型列表下拉
GET /api/metrics GET /v1/stats + GET /metrics 监控面板数据(可选)

metrics 可选:若 gateway 未暴露 /metrics 端点,工作站会优雅回退,监控面板显示"—"而不报错。


📁 文件结构

sagellm-workstation/
├── server.py        ← FastAPI 服务端(代理 + 静态文件)
├── index.html       ← 完整前端 UI(无外部依赖,全部内联)
├── config.ini       ← 用户配置(记事本可编辑)
├── requirements.txt ← Python 依赖(fastapi, uvicorn, httpx)
├── start.bat        ← Windows 双击启动
└── start.sh         ← Linux/macOS 启动

🎨 白牌定制示例

[brand]
name         = 数智政务助手
accent_color = #0ea5e9

[sagellm]
backend_type = 天数智芯 GPU

🐳 Docker 模式(进阶)

docker compose build
docker compose up -d
docker compose logs -f

License

MIT

Metadata

Release files for isagellm-workstation 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isagellm-workstation 0.1.0
File Size Uploaded Provenance
isagellm_workstation-0.1.0.tar.gz 22.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for isagellm-workstation 0.1.0
File Interpreter ABI Platform
isagellm_workstation-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.1 kB

Release files / isagellm_workstation-0.1.0.tar.gz

Download URL isagellm_workstation-0.1.0.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
26a2c8f8b683be89abfba47ace7e9f07749a588db17231269fec02573ea84a48
BLAKE2b-256 checksum
How to use checksums
6ea4a974dbd61976e410a54bac6ec965c2f8baaef2a784d984a0e77b4beab253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / isagellm_workstation-0.1.0-py3-none-any.whl

Download URL isagellm_workstation-0.1.0-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
920c58342940f8e7d4f508983abb4a873b8b0c65977ddb401fbbc287b17c5c1c
BLAKE2b-256 checksum
How to use checksums
45e709aa8cfddee44376b78153cc3438a6fa2080637f889966b788d5e8af920c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Security for isagellm-workstation 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page