Explorar o código

feat: update stream_options again

CalciumIon hai 1 ano
pai
achega
9ef3212e6c
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      relay/channel/openai/relay-openai.go

+ 1 - 3
relay/channel/openai/relay-openai.go

@@ -87,9 +87,7 @@ func OaiStreamHandler(c *gin.Context, resp *http.Response, info *relaycommon.Rel
 	err := json.Unmarshal(common.StringToByteSlice(lastStreamData), &lastStreamResponse)
 	if err == nil {
 		if lastStreamResponse.Usage != nil && service.ValidUsage(lastStreamResponse.Usage) {
-			if info.ShouldIncludeUsage {
-				containStreamUsage = true
-			} else {
+			if !info.ShouldIncludeUsage {
 				shouldSendLastResp = false
 			}
 		}