mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 22:17:24 +01:00
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:
committed by
Michael Yang
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{
|
||||
|
||||
Reference in New Issue
Block a user