mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 08:17:03 +00:00
Merge pull request #774 from jmorganca/mxyng/server-version
add version api and show server version in cli
This commit is contained in:
@@ -827,6 +827,9 @@ func Serve(ln net.Listener, allowOrigins []string) error {
|
||||
})
|
||||
|
||||
r.Handle(method, "/api/tags", ListModelsHandler)
|
||||
r.Handle(method, "/api/version", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"version": version.Version})
|
||||
})
|
||||
}
|
||||
|
||||
log.Printf("Listening on %s (version %s)", ln.Addr(), version.Version)
|
||||
|
||||
Reference in New Issue
Block a user