From 4abeb0a0f0e4fb46d9fd7ca01c760db94f87246e Mon Sep 17 00:00:00 2001 From: zhaoyingbo Date: Thu, 27 Feb 2025 05:02:30 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E8=AF=B7=E6=B1=82=E5=A4=84=E7=90=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E6=9B=B4=E6=96=B0=E7=9B=B8=E5=85=B3=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bun.lockb | Bin 180502 -> 180502 bytes index.ts | 3 +++ package.json | 2 +- routes/modelProxy/index.ts | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 routes/modelProxy/index.ts diff --git a/bun.lockb b/bun.lockb index 03dbd9912ba6351498854c4722a86c631e09763a..070c6c1569df14050036a724c82a317cf2f769b5 100755 GIT binary patch delta 141 zcmV;80CNA9f(w>{3y>}#?$(Q}PpeNv)U&9J=xsX|Q*;{*jkRq{3y>}#b2XvRNE05;a9w{l7!I2PAa57#5>H568^u3blJ5!Wu}(U9 zlgL6av$%QvvOq*8%paGfuh=7iF@uIg)4BjQ)q6<;Fa3@}p8RdrM{2e0Q^tkLu7A{` vudABN*p~aV{{>wF0B|*4QP(g9N*=fMECG { + const { req, logger } = ctx + logger.info("model proxy") + const PROXY_URL = + "http://ms-13871-nstruct-lmdeploy-2-0109140455.kscn-tj5-prod2-cloudml.xiaomi.srv" + return fetch(PROXY_URL + new URL(req.url).pathname, { + method: req.method, + body: req.body, + }) +}