mirror of
https://github.com/alibaba/higress.git
synced 2026-04-20 19:47:29 +08:00
fix chunk merge bug in ai-search (#1895)
This commit is contained in:
@@ -572,10 +572,8 @@ func onStreamingResponseBody(ctx wrapper.HttpContext, config Config, chunk []byt
|
||||
} else {
|
||||
ctx.SetContext(PARTIAL_MESSAGE_CONTEXT_KEY, nil)
|
||||
}
|
||||
if len(newMessages) == 1 {
|
||||
return []byte(fmt.Sprintf("%s\n\n", newMessages[0]))
|
||||
} else if len(newMessages) > 1 {
|
||||
return []byte(strings.Join(newMessages, "\n\n"))
|
||||
if len(newMessages) > 0 {
|
||||
return []byte(fmt.Sprintf("%s\n\n", strings.Join(newMessages, "\n\n")))
|
||||
} else {
|
||||
return []byte("")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user