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 @@ - - - 🤖 AI 问答 - 报错信息、英文邮件、生活问题、代码片段——直接问。支持多轮上下文。 + + + + + 新建对话 + + + + + + {{ c.title }} + {{ fmtTime(c.updatedAt) }} + + ✕ + + + 暂无对话,点上方「新建对话」开始 + - 🗑 清空对话 - + + + - 👋 - 试试这些问题: + 有什么我能帮你的吗? - + {{ s }} + ⚠️ {{ error }} - - {{ m.role === 'user' ? '我' : 'AI' }} - - {{ m.content }} - - - - AI - - - 思考中… - - - ⚠️ {{ error }} - - - - - {{ busy ? '…' : '发送' }} - + + + + {{ m.role === 'user' ? '我' : 'AI' }} + + {{ m.content }} + + + + AI + + + 思考中({{ model }})… + + + ⚠️ {{ error }} + + + + + + + + 模型 + + {{ m }} + + + 内容由 AI 生成,仅供参考 + + {{ busy ? '…' : '🚀 发送' }} + + + @@ -120,102 +239,193 @@ function clearChat() {
{{ m.content }}