From 8c2bfbb214d2311af85425fc707ebf8e1de93c62 Mon Sep 17 00:00:00 2001 From: MT-Fire <798521692@qq.com> Date: Wed, 11 Mar 2026 17:28:36 +0800 Subject: [PATCH] =?UTF-8?q?build:=208000=E7=AB=AF=E5=8F=A3=E8=A2=AB?= =?UTF-8?q?=E5=8D=A0=E7=94=A8=EF=BC=8C=E4=BD=BF=E7=94=A88002=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=EF=BC=9B=E7=A6=81=E7=94=A8zai-sdk=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E6=98=AF=E6=97=A7=E7=89=88=E6=9C=AC=E6=99=BA?= =?UTF-8?q?=E8=B0=B1sdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/main.py | 4 ++-- server/requirements.txt | 2 +- vite.config.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/main.py b/server/main.py index d4bdaaf..5a61946 100644 --- a/server/main.py +++ b/server/main.py @@ -237,7 +237,7 @@ async def delete_attachment(url: str): if __name__ == "__main__": import uvicorn - port = int(os.getenv("PORT", 8000)) + port = int(os.getenv("PORT", 8002)) # 获取可用平台 from config.settings import get_available_providers @@ -253,7 +253,7 @@ if __name__ == "__main__": print(f" 可用平台 : {', '.join(available) or '无(请配置 API Key)'}") print("-" * 60) print(" 使用方法:") - print(" curl -X POST http://localhost:8000/v1/chat/completions \\") + print(f" curl -X POST http://localhost:{port}/v1/chat/completions \\") print(' -H "Content-Type: application/json" \\') print(' -d \'{"model":"glm-4-flash","messages":[{"role":"user","content":"hi"}]}\'') print("=" * 60) diff --git a/server/requirements.txt b/server/requirements.txt index efd9a62..881e4e5 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -99,5 +99,5 @@ virtualenv==21.1.0 websocket-client==1.9.0 wrapt==2.1.1 yarl==1.23.0 -zai-sdk==0.2.2 +# zai-sdk==0.2.2 zhipuai==2.1.5.20250825 diff --git a/vite.config.ts b/vite.config.ts index ce319d6..3ddff3b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ host: "0.0.0.0", proxy: { "/api/chat-ui": { - target: "http://localhost:8000", // Python服务器端口 + target: "http://localhost:8002", // Python服务器端口 changeOrigin: true, }, "/api/auth": {