server: omit model system prompt if empty (#5717)
This commit is contained in:
parent
8eac50dd4f
commit
4cb5d7decc
1 changed files with 1 additions and 1 deletions
|
@ -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...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue