use head to check heartbeat

This commit is contained in:
Bruce MacDonald
2023-08-01 14:50:38 -04:00
parent 40a25bf8c3
commit 765994362c
2 changed files with 4 additions and 1 deletions

View File

@@ -319,6 +319,9 @@ func Serve(ln net.Listener) error {
r.GET("/", func(c *gin.Context) {
c.String(http.StatusOK, "Ollama is running")
})
r.HEAD("/", func(c *gin.Context) {
c.Status(http.StatusOK)
})
r.POST("/api/pull", PullModelHandler)
r.POST("/api/generate", GenerateHandler)