You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.
I have searched the issues of this repository and believe that this is not a duplicate.
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via ASRC(Alibaba Security Response Center) where the issue will be triaged appropriately.
Ⅰ. Issue Description
使用 Higress 配置 ai-proxy 插件来代理 dashscope / openai 等模型,在使用社区 golang sdk 进行流式返回的时候发现使用 qwen-plus 模型时, golang 侧解析出来的response结构体为空,但使用 gpt-4o-mini 模型时并没有问题
通过在终端使用 curl 测试两者区别发现使用 qwen 系列模型时返回结构中缺少部分值为 null 的字段
qwen系列返回数据
openai 系列返回数据
在 sdk 的仓库里看到结构体定义中, system_fingerprint 、finish_reason 等字段是必须存在的(没有添加标签omitempty),导致了结构体解析失败
https://github.com/sashabaranov/go-openai/blob/2a0ff5ac63e460cbe44cccd0d4199d51bf8682a4/chat_stream.go#L38
https://github.com/sashabaranov/go-openai/blob/2a0ff5ac63e460cbe44cccd0d4199d51bf8682a4/chat_stream.go#L53
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
Ⅲ. Describe what you expected to happen
希望在返回的结构中与 Openai 保持一致,补全缺失的字段信息
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
The text was updated successfully, but these errors were encountered: