Skip to content

Commit 28bcc38

Browse files
committed
Set stream parameter to false in request body for proxy handler
1 parent f4ec1dc commit 28bcc38

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

internal/proxy_handler.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ func HandlerTxt(w http.ResponseWriter, req *http.Request) {
7777

7878
modelName = gjson.GetBytes(reqBodyBytes, "model").String()
7979

80+
// Replace stream = false
81+
if gjson.GetBytes(reqBodyBytes, "stream").Bool() {
82+
reqBodyBytes, _ = sjson.SetBytes(reqBodyBytes, "stream", false)
83+
}
84+
8085
if len(modelName) < 10 {
8186
if modelName != "BIG" {
8287
modelSize = "SMALL"

0 commit comments

Comments
 (0)