Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
b97eb2b8
Unverified
Commit
b97eb2b8
authored
Oct 25, 2025
by
Patrick Devine
Committed by
GitHub
Oct 25, 2025
Browse files
cloud: set the proxy content-type to the same as local models (#12759)
parent
ad6f6a1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
server/routes.go
server/routes.go
+12
-0
No files found.
server/routes.go
View file @
b97eb2b8
...
@@ -289,6 +289,12 @@ func (s *Server) GenerateHandler(c *gin.Context) {
...
@@ -289,6 +289,12 @@ func (s *Server) GenerateHandler(c *gin.Context) {
return
return
}
}
contentType
:=
"application/json; charset=utf-8"
if
req
.
Stream
!=
nil
&&
*
req
.
Stream
{
contentType
=
"application/x-ndjson"
}
c
.
Header
(
"Content-Type"
,
contentType
)
return
return
}
}
...
@@ -1932,6 +1938,12 @@ func (s *Server) ChatHandler(c *gin.Context) {
...
@@ -1932,6 +1938,12 @@ func (s *Server) ChatHandler(c *gin.Context) {
return
return
}
}
contentType
:=
"application/json; charset=utf-8"
if
req
.
Stream
!=
nil
&&
*
req
.
Stream
{
contentType
=
"application/x-ndjson"
}
c
.
Header
(
"Content-Type"
,
contentType
)
return
return
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment