From 61269a346ceedb780c4eaefacc78167d431eed43 Mon Sep 17 00:00:00 2001 From: personal82555 Date: Tue, 13 Oct 2026 09:56:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20AI=E9=97=AE=E7=AD=94=E6=94=B9=E5=A4=9A?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=B8=83=E5=B1=80=20=E2=80=94=20=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=AF=B9=E8=AF=9D=E5=88=97=E8=A1=A8(=E6=96=B0?= =?UTF-8?q?=E5=BB=BA/=E6=90=9C=E7=B4=A2/=E5=88=A0=E9=99=A4/=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=88=B3/=E8=87=AA=E5=8A=A8=E5=91=BD=E5=90=8D,=20loca?= =?UTF-8?q?lStorage=E4=BF=9D=E7=95=9930=E4=B8=AA),=20=E6=AC=A2=E8=BF=8E?= =?UTF-8?q?=E9=A1=B5=E5=A4=A7=E6=A0=87=E9=A2=98+=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98,=20=E8=BE=93=E5=85=A5=E5=8C=BA=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E4=B8=8B=E6=8B=89(mimo-v2.6-flash/glm-5.3-flash),=20r?= =?UTF-8?q?elay=E6=A8=A1=E5=9E=8B=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/it-tools-relay/server.py | 3 + src/tools/ai-chat/ai-chat.vue | 498 ++++++++++++++++++++++++-------- 2 files changed, 374 insertions(+), 127 deletions(-) diff --git a/docker/it-tools-relay/server.py b/docker/it-tools-relay/server.py index fd9e8dd..460db42 100644 --- a/docker/it-tools-relay/server.py +++ b/docker/it-tools-relay/server.py @@ -1843,6 +1843,9 @@ class Handler(BaseHTTPRequestHandler): if not key: self._reply(500, json.dumps({"code": 500, "message": "AI 服务未配置"}, ensure_ascii=False).encode(), "application/json") return + want = str(payload.get("model") or "") + if want in ("mimo-v2.6-flash", "glm-5.3-flash"): + model = want try: body = json.dumps({"model": model, "messages": messages, "temperature": 0.7, "max_tokens": 2048}).encode() req = request.Request(upstream, data=body, headers={"Content-Type": "application/json", "Authorization": "Bearer " + key}) diff --git a/src/tools/ai-chat/ai-chat.vue b/src/tools/ai-chat/ai-chat.vue index d367461..d254f2b 100644 --- a/src/tools/ai-chat/ai-chat.vue +++ b/src/tools/ai-chat/ai-chat.vue @@ -1,5 +1,5 @@