mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
fix(ai-proxy): resolve Claude streaming response conversion and SSE event chunking issues (#2882)
This commit is contained in:
@@ -406,7 +406,8 @@ func onStreamingResponseBody(ctx wrapper.HttpContext, pluginConfig config.Plugin
|
||||
return chunk
|
||||
}
|
||||
if len(outputEvents) == 0 {
|
||||
responseBuilder.WriteString(event.ToHttpString())
|
||||
// no need convert, keep original events
|
||||
responseBuilder.WriteString(event.RawEvent)
|
||||
} else {
|
||||
for _, outputEvent := range outputEvents {
|
||||
responseBuilder.WriteString(outputEvent.ToHttpString())
|
||||
|
||||
Reference in New Issue
Block a user