"docs/source/vscode:/vscode.git/clone" did not exist on "070c45bbfa26d6e6c59dd24e5133082c1416d607"
Unverified Commit b97eb2b8 authored by Patrick Devine's avatar Patrick Devine Committed by GitHub
Browse files

cloud: set the proxy content-type to the same as local models (#12759)

parent ad6f6a1d
......@@ -289,6 +289,12 @@ func (s *Server) GenerateHandler(c *gin.Context) {
return
}
contentType := "application/json; charset=utf-8"
if req.Stream != nil && *req.Stream {
contentType = "application/x-ndjson"
}
c.Header("Content-Type", contentType)
return
}
......@@ -1932,6 +1938,12 @@ func (s *Server) ChatHandler(c *gin.Context) {
return
}
contentType := "application/json; charset=utf-8"
if req.Stream != nil && *req.Stream {
contentType = "application/x-ndjson"
}
c.Header("Content-Type", contentType)
return
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment