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

通义千问空请求. #1449

Open
5 tasks
sparkssssssss opened this issue May 22, 2024 · 7 comments
Open
5 tasks

通义千问空请求. #1449

sparkssssssss opened this issue May 22, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@sparkssssssss
Copy link

sparkssssssss commented May 22, 2024

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,尤其是常见问题部分
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述
使用最新release 0.65 docker 部署,已经使用快一个月了,其中添加了多个第三方api,添加了deepseek官方api,一直正常,大部分都是通过模型重定向来使用的.
今日添加了通义千问,模型重定向 "gpt-3.5-turbo-0125": "qwen-long"
使用nextchat发起对话,不知道什么情况下,会触发空请求,对话返回如下,

{
  "error": true,
  "message": "empty response from server"
}

one-api中日志显示如下
Snipaste_2024-05-22_12-33-02

同时,在终端中测试直接访问通义千问官方api,如下正常
Snipaste_2024-05-22_13-59-47

next-chat中测试不知道什么情况下触发
但是我同时还在使用一个安卓第三方app https://github.com/Skythinker616/gpt-assistant-android 使用其他模型都正常,但是这个重定向的模型,必现,抓包看也没什么异常.但是响应确实是空的

[GIN] 2024/05/22 - 15:45:18 | 2024052215451850938572957121880 | 200 |  312.728997ms | xxx.xxx.xxx.xxx|    POST /v1/chat/completions
[INFO] 2024/05/22 - 15:45:18 | 2024052215451850938572957121880 | record consume log: userId=1, channelId=36, promptTokens=0, completionTokens=0, modelName=qwen-long, tokenName=b9JrzmS27iArvB, quota=0, content=模型倍率 30.00,分组倍率 1.00,补全倍率 1.00 

Snipaste_2024-05-22_15-48-25

复现步骤
https://github.com/Skythinker616/gpt-assistant-android 使用这个第三方app必现,next-chat有几率出现.
预期结果

相关截图
如果没有的话,请删除此节。

@sparkssssssss sparkssssssss added the bug Something isn't working label May 22, 2024
@sparkssssssss
Copy link
Author

sparkssssssss commented May 22, 2024

curl --location 'https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions' --header 'Authorization: Bearer sk-xxxxxxxx' --header 'Content-Type: application/json' --data '{"model":"qwen-long","n":1,"stream":true,"temperature":0.2,"messages":[{"role":"user","content":"测试"}],"frequency_penalty":0.0,"max_tokens":2048,"presence_penalty":0.0,"top_p":1.0}'

经过测试,应该通义千问还是兼容有点问题,
这些参数是客户端发起的时候,自带的在openai/deepseek上都正常,但是唯独放到通义千问上,会报错.
删掉"frequency_penalty":0.0,"max_tokens":2048,"presence_penalty":0.0,"top_p":1.0这些就正常了

@mlkt
Copy link

mlkt commented May 23, 2024

我也遇到这个问题

@johnlanni
Copy link

可以试试 higress : alibaba/higress#1023

@KagaJiankui
Copy link

阿里云代理的零一万物、百川2等大模型上都存在类似的空请求bug, dashscope提供的openai兼容API似乎也存在

@johnlanni
Copy link

可以试一下 higress 实现的 openai 协议兼容,纯流式的,function call 也流式,不是直接用的 dashscope 的兼容 API,应该没有类似问题

@KagaJiankui
Copy link

在平常使用的Windows工作机上用docker compose部署失败, 仍然fetch failed, 偶尔遇到higress相关issue里的其他问题

@johnlanni
Copy link

@KagaJiankui 有具体问题可以在这里发一下:alibaba/higress#1023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants