feat: Add '/version' endpoint and display it in the CLI (#679)

This commit is contained in:
Ettore Di Giacinto 2023-06-26 15:12:43 +02:00 committed by GitHub
parent 2b957df56c
commit d3a486a4f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 2 deletions

10
internal/version.go Normal file
View file

@ -0,0 +1,10 @@
package internal
import "fmt"
var Version = ""
var Commit = ""
func PrintableVersion() string {
return fmt.Sprintf("LocalAI %s (%s)", Version, Commit)
}