"llama/llama.cpp/src/llama-sampling.cpp" did not exist on "527cc9789995bf3125bc310bfff19eecbfd6c9a0"
Commit 1ebdbd96 authored by Michael Yang's avatar Michael Yang
Browse files

server: add version handler

parent 5c59455b
...@@ -782,6 +782,9 @@ func Serve(ln net.Listener, allowOrigins []string) error { ...@@ -782,6 +782,9 @@ func Serve(ln net.Listener, allowOrigins []string) error {
}) })
r.Handle(method, "/api/tags", ListModelsHandler) 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) log.Printf("Listening on %s (version %s)", ln.Addr(), version.Version)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment