mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 18:17:06 +01:00
Merge pull request #4218 from dhiltgen/auto_parallel
Enable concurrency by default
This commit is contained in:
@@ -1237,6 +1237,11 @@ func (s *Server) ProcessHandler(c *gin.Context) {
|
||||
models = append(models, mr)
|
||||
}
|
||||
|
||||
slices.SortStableFunc(models, func(i, j api.ProcessModelResponse) int {
|
||||
// longest duration remaining listed first
|
||||
return cmp.Compare(j.ExpiresAt.Unix(), i.ExpiresAt.Unix())
|
||||
})
|
||||
|
||||
c.JSON(http.StatusOK, api.ProcessResponse{Models: models})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user