mirror of
https://github.com/ollama/ollama.git
synced 2025-11-12 20:07:31 +01:00
check server is running before running command
This commit is contained in:
@@ -318,6 +318,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)
|
||||
|
||||
Reference in New Issue
Block a user