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": {