Skip to content

Commit

Permalink
fix: fix stream mode determine related logic (close #360)
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Aug 6, 2023
1 parent 446337c commit d96cf2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/relay-text.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
if err != nil {
return errorWrapper(err, "close_request_body_failed", http.StatusInternalServerError)
}
isStream = strings.HasPrefix(resp.Header.Get("Content-Type"), "text/event-stream")
isStream = isStream || strings.HasPrefix(resp.Header.Get("Content-Type"), "text/event-stream")
}

var textResponse TextResponse
Expand Down

0 comments on commit d96cf2e

Please sign in to comment.