mirror of
https://github.com/alibaba/higress.git
synced 2026-05-26 21:57:30 +08:00
special handling for cases where extracted content is empty and add unit test (#3251)
This commit is contained in:
@@ -100,10 +100,11 @@ func HandleTextGenerationStreamingResponseBody(ctx wrapper.HttpContext, config c
|
||||
break
|
||||
}
|
||||
}
|
||||
// if streaming body has reasoning_content, buffer maybe empty
|
||||
// case 1: streaming body has reasoning_content, part of buffer maybe empty
|
||||
// case 2: streaming body has toolcall result, part of buffer maybe empty
|
||||
log.Debugf("current content piece: %s", buffer)
|
||||
if len(buffer) == 0 {
|
||||
return
|
||||
buffer = "[empty content]"
|
||||
}
|
||||
ctx.SetContext("during_call", true)
|
||||
log.Debugf("current content piece: %s", buffer)
|
||||
|
||||
Reference in New Issue
Block a user