mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-21 02:36:39 +08:00
fixed bug for QWen response blank quotes
This commit is contained in:
parent
4ca9dfd9c0
commit
06f4cdc649
@ -1,4 +1,7 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
## v4.0.4
|
||||||
|
* Bug修复:修复通义千问第二句不回复的问题。
|
||||||
|
|
||||||
## v4.0.3 2024-04-15
|
## v4.0.3 2024-04-15
|
||||||
* Bug修复:修复MJ-PLUS 服务会自动删除10分钟前的任务问题
|
* Bug修复:修复MJ-PLUS 服务会自动删除10分钟前的任务问题
|
||||||
* Bug修复:修复MJ 的 U/V 操作会强制使用 Fast 模式 Bug
|
* Bug修复:修复MJ 的 U/V 操作会强制使用 Fast 模式 Bug
|
||||||
|
@ -326,10 +326,12 @@ func (h *ChatHandler) sendMessage(ctx context.Context, session *types.ChatSessio
|
|||||||
}
|
}
|
||||||
|
|
||||||
if session.Model.Platform == types.QWen {
|
if session.Model.Platform == types.QWen {
|
||||||
req.Input = map[string]interface{}{"prompt": prompt}
|
req.Input = make(map[string]interface{})
|
||||||
if len(reqMgs) > 0 {
|
reqMgs = append(reqMgs, types.Message{
|
||||||
|
Role: "user",
|
||||||
|
Content: prompt,
|
||||||
|
})
|
||||||
req.Input["messages"] = reqMgs
|
req.Input["messages"] = reqMgs
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
req.Messages = append(reqMgs, map[string]interface{}{
|
req.Messages = append(reqMgs, map[string]interface{}{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
|
@ -82,10 +82,11 @@ func (h *ChatHandler) sendQWenMessage(
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(line, "data:") {
|
if !strings.HasPrefix(line, "data:") {
|
||||||
content = line[5:]
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
content = line[5:]
|
||||||
var resp qWenResp
|
var resp qWenResp
|
||||||
if len(contents) == 0 { // 发送消息头
|
if len(contents) == 0 { // 发送消息头
|
||||||
if !outPutStart {
|
if !outPutStart {
|
||||||
|
Loading…
Reference in New Issue
Block a user