bring done out of loop
This commit is contained in:
parent
919e4dd919
commit
2a75fd241a
@ -139,6 +139,8 @@ func nightmare(c *gin.Context) {
|
||||
}
|
||||
if !original_request.Stream {
|
||||
c.JSON(200, official_types.NewChatCompletion(full_response))
|
||||
} else {
|
||||
c.String(200, "data: [DONE]\n\n")
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -211,8 +211,6 @@ func Handler(c *gin.Context, response *http.Response, token string, translated_r
|
||||
if stream {
|
||||
final_line := official_types.StopChunk(finish_reason)
|
||||
c.Writer.WriteString("data: " + final_line.String() + "\n\n")
|
||||
|
||||
c.String(200, "data: [DONE]\n\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user