mirror of https://github.com/ollama/ollama
fix keep alive
this reference to keep alive was missed in #12041 so chat has a diffferent behaviour than generate
This commit is contained in:
parent
3d0b1734c0
commit
35ac4eb12c
|
|
@ -1777,7 +1777,7 @@ func (s *Server) ChatHandler(c *gin.Context) {
|
|||
}
|
||||
|
||||
// expire the runner
|
||||
if len(req.Messages) == 0 && req.KeepAlive != nil && int(req.KeepAlive.Seconds()) == 0 {
|
||||
if len(req.Messages) == 0 && req.KeepAlive != nil && req.KeepAlive.Duration == 0 {
|
||||
s.sched.expireRunner(m)
|
||||
|
||||
c.JSON(http.StatusOK, api.ChatResponse{
|
||||
|
|
|
|||
Loading…
Reference in New Issue