fix: xAI missing finish_reason #572
This commit is contained in:
1 parent
31df701579
commit
96e3eeceb1
1 file changed
+5
@@ -98,6 +98,11 @@ func OaiStreamHandler(c *gin.Context, resp *http.Response, info *relaycommon.Rel
|
|||||||
shouldSendLastResp = false
|
shouldSendLastResp = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, choice := range lastStreamResponse.Choices {
|
||||||
|
if choice.FinishReason != nil {
|
||||||
|
shouldSendLastResp = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if shouldSendLastResp {
|
if shouldSendLastResp {
|
||||||
service.StringData(c, lastStreamData)
|
service.StringData(c, lastStreamData)
|
||||||
|
|||||||
Reference in new issue
Block a user