Unverified Commit 4cb5d7de authored by Jeffrey Morgan's avatar Jeffrey Morgan Committed by GitHub
Browse files

server: omit model system prompt if empty (#5717)

parent 8eac50dd
...@@ -1310,7 +1310,7 @@ func (s *Server) ChatHandler(c *gin.Context) { ...@@ -1310,7 +1310,7 @@ func (s *Server) ChatHandler(c *gin.Context) {
return return
} }
if req.Messages[0].Role != "system" { if req.Messages[0].Role != "system" && m.System != "" {
req.Messages = append([]api.Message{{Role: "system", Content: m.System}}, req.Messages...) req.Messages = append([]api.Message{{Role: "system", Content: m.System}}, req.Messages...)
} }
......
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