From 81c01abf4eedddfe3fa564259a7fa8471be51d33 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Fri, 10 Apr 2026 01:35:50 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20LLM=20Proxy=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85=EF=BC=8C=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=20v0.5.0=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROJECTS.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/PROJECTS.md b/PROJECTS.md index 437030c..ebcf155 100644 --- a/PROJECTS.md +++ b/PROJECTS.md @@ -13,7 +13,7 @@ | 3 | 产品参数爬取系统 | Web | 19011/19012 | ✅ 运行中 | 2026-04-10 | | 4 | 碎片信息记录 | Web | 19009 | ✅ 运行中 | 2026-04-09 | | 5 | ParamHub Python版 | Web | 19010 | ✅ 运行中 | 2026-04-09 | -| 6 | LLM Proxy | Web | 19007/19008 | ✅ 运行中 | 2026-04-09 | +| 6 | LLM Proxy | Web | 19007/19008 | ✅ 运行中 | 2026-04-10 | | 7 | 网页助手插件 | Extension | - | 📦 已完成 | 2026-04-08 | | 8 | A股历史数据系统 | CLI | - | 🔄 优化中 | 2026-04-09 | @@ -85,7 +85,7 @@ curl -s http://localhost:19001/api/stats **简介**: 自动从官方网站爬取产品参数信息,支持多步骤爬取流程(入口页→列表页→详情页)。 -**目录**: `works/product-crawler` +**目录**: `/home/xian/.openclaw/common/projects/product-crawler` **启动命令**: ```bash @@ -197,7 +197,65 @@ curl -s http://localhost:19010/api/categories --- -### 6. PDF翻译助手 V1 (pdf-translate-web) +### 6. LLM Proxy (llm-proxy) + +**简介**: 大模型API中转系统,兼容OpenAI API格式,支持多上游提供商优先级调度、请求统计。 + +**目录**: `/home/xian/.openclaw/common/projects/llm-proxy` + +**启动命令**: +```bash +# API服务 +cd ~/.openclaw/common/projects/llm-proxy +python3 app.py + +# 后台管理 +cd ~/.openclaw/common/projects/llm-proxy/admin +python3 app.py +``` + +**访问地址**: +- API服务: http://localhost:19007 +- 后台管理: http://localhost:19008 + +**检查服务状态**: +```bash +curl -s http://localhost:19007/health +curl -s http://localhost:19008/api/stats +``` + +**Git仓库**: http://192.168.2.8:12007/coder/llm-proxy + +**版本**: v0.5.0 + +**功能特点**: +- OpenAI API兼容格式 +- 多上游提供商优先级调度 +- 自动重试和故障切换 +- 请求统计(次数、成功/失败、token数) +- 模型别名和auto配置 +- 后台管理界面 + +**API使用示例**: +```bash +# curl +curl -X POST http://localhost:19007/v1/chat/completions \ + -H 'Content-Type: application/json' \ + -d '{"model": "auto", "messages": [{"role": "user", "content": "你好"}]}' + +# Python OpenAI SDK +from openai import OpenAI +client = OpenAI(base_url='http://localhost:19007/v1', api_key='any') +response = client.chat.completions.create(model='auto', messages=[{'role': 'user', 'content': '你好'}]) +print(response.choices[0].message.content) +``` + +**依赖**: +- Python 3 + Flask + Flask-CORS + +--- + +### 7. PDF翻译助手 V1 (pdf-translate-web) **简介**: 英文PDF翻译中文网站第一版,支持翻译、缓存、用户系统。 @@ -207,7 +265,7 @@ curl -s http://localhost:19010/api/categories --- -### 7. PDF翻译脚本 (pdf-translator) +### 8. PDF翻译脚本 (pdf-translator) **简介**: 基于本地LLM的英文PDF翻译命令行工具,支持Markdown/TXT/JSON输出。 @@ -287,7 +345,7 @@ ls -lh /home/xian/.openclaw/common/stock_system/data/stock_daily_data.parquet | ParamHub Node | http://192.168.2.8:12007/coder/param-hub | v0.2.0 | | ParamHub Python | http://192.168.2.8:12007/coder/param-hub-python | v0.3.1 | | LLM Index RAG | http://192.168.2.8:12007/coder/llm-index-rag | v1.2.0 | -| LLM Proxy | http://192.168.2.8:12007/coder/llm-proxy | v0.4.0 | +| LLM Proxy | http://192.168.2.8:12007/coder/llm-proxy | v0.5.0 | | 产品参数爬取系统 | http://192.168.2.8:12007/coder/product-crawler | v1.0.0 | | 网页助手插件 | http://192.168.2.8:12007/coder/web-context-extension | v0.1.0 | | A股历史数据系统 | http://192.168.2.8:12007/coder/stock_system | v0.2.0 |