Merge pull request #787 from jmorganca/mxyng/server-version2

server: print version on start
This commit is contained in:
Michael Yang 2023-10-16 09:59:30 -07:00 committed by GitHub
commit 43eaba3d60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,7 @@ import (
"github.com/jmorganca/ollama/api"
"github.com/jmorganca/ollama/llm"
"github.com/jmorganca/ollama/version"
)
var mode string = gin.DebugMode
@ -588,7 +589,7 @@ func Serve(ln net.Listener, allowOrigins []string) error {
r.Handle(method, "/api/tags", ListModelsHandler)
}
log.Printf("Listening on %s", ln.Addr())
log.Printf("Listening on %s (version %s)", ln.Addr(), version.Version)
s := &http.Server{
Handler: r,
}