Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

与OpenWebUI搭配使用 - 讯飞星火websocket: bad handshake #99

Open
neon9809 opened this issue Jan 31, 2025 · 1 comment
Open

与OpenWebUI搭配使用 - 讯飞星火websocket: bad handshake #99

neon9809 opened this issue Jan 31, 2025 · 1 comment

Comments

@neon9809
Copy link

Simple-one-api与OpenWebUI均在docker中部署
OpenWebUI可以正常正确识别到“random”和“spark-lite”两个选项
但是通过OpenWebUI向Spark-Lite发送请求时提示网络出错

Docker log如下:

2025/01/31 15:27:28 sparkclient.go:167: Failed to establish WebSocket connection: websocket: bad handshake, code=401,body={"message":"HMAC signature cannot be verified: fail to retrieve credential"}, wss://spark-api.xf-yun.com/v1.1/chat?authorization=******&date=Fri%2C+31+Jan+2025+15%3A27%3A28+UTC&host=spark-api.xf-yun.com 2025-01-31T15:27:28.292Z ERROR handler/openai_handler.go:301 websocket: bad handshake 2025-01-31T15:32:45.701Z ERROR handler/openai_handler.go:301 websocket: bad handshake 2025/01/31 15:32:45 sparkclient.go:167: Failed to establish WebSocket connection: websocket: bad handshake, code=401,body={"message":"HMAC signature cannot be verified: fail to retrieve credential"}, wss://spark-api.xf-yun.com/v1.1/chat?authorization=******&date=Fri%2C+31+Jan+2025+15%3A32%3A42+UTC&host=spark-api.xf-yun.com 2025-01-31T15:33:03.185Z ERROR handler/openai_handler.go:301 websocket: bad handshake 2025/01/31 15:33:03 sparkclient.go:167: Failed to establish WebSocket connection: websocket: bad handshake, code=401,body={"message":"HMAC signature cannot be verified: fail to retrieve credential"}, wss://spark-api.xf-yun.com/v1.1/chat?authorization=******&date=Fri%2C+31+Jan+2025+15%3A33%3A03+UTC&host=spark-api.xf-yun.com

log没有反馈配置问题,但还是如下附上:

{ "debug": true, "load_balancing": "random", "services": { "xinghuo": [ { "models": ["spark-lite"], "enabled": true,"limit":{"qps":2,"timeout":10}, "credentials": { "appid": "******", "api_key": "******", "api_secret": "******" } } ] } }

@fruitbars
Copy link
Owner

确认一下api_key和 api_secret,官网的这两个信息显示是反的,注意别贴错了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants