build: 8000端口被占用,使用8002端口;禁用zai-sdk,使用的是旧版本智谱sdk
This commit is contained in:
parent
072eb95b4b
commit
8c2bfbb214
|
|
@ -237,7 +237,7 @@ async def delete_attachment(url: str):
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
port = int(os.getenv("PORT", 8000))
|
port = int(os.getenv("PORT", 8002))
|
||||||
|
|
||||||
# 获取可用平台
|
# 获取可用平台
|
||||||
from config.settings import get_available_providers
|
from config.settings import get_available_providers
|
||||||
|
|
@ -253,7 +253,7 @@ if __name__ == "__main__":
|
||||||
print(f" 可用平台 : {', '.join(available) or '无(请配置 API Key)'}")
|
print(f" 可用平台 : {', '.join(available) or '无(请配置 API Key)'}")
|
||||||
print("-" * 60)
|
print("-" * 60)
|
||||||
print(" 使用方法:")
|
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(' -H "Content-Type: application/json" \\')
|
||||||
print(' -d \'{"model":"glm-4-flash","messages":[{"role":"user","content":"hi"}]}\'')
|
print(' -d \'{"model":"glm-4-flash","messages":[{"role":"user","content":"hi"}]}\'')
|
||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
|
|
|
||||||
|
|
@ -99,5 +99,5 @@ virtualenv==21.1.0
|
||||||
websocket-client==1.9.0
|
websocket-client==1.9.0
|
||||||
wrapt==2.1.1
|
wrapt==2.1.1
|
||||||
yarl==1.23.0
|
yarl==1.23.0
|
||||||
zai-sdk==0.2.2
|
# zai-sdk==0.2.2
|
||||||
zhipuai==2.1.5.20250825
|
zhipuai==2.1.5.20250825
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export default defineConfig({
|
||||||
host: "0.0.0.0",
|
host: "0.0.0.0",
|
||||||
proxy: {
|
proxy: {
|
||||||
"/api/chat-ui": {
|
"/api/chat-ui": {
|
||||||
target: "http://localhost:8000", // Python服务器端口
|
target: "http://localhost:8002", // Python服务器端口
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
"/api/auth": {
|
"/api/auth": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue