Files
LocalAI/internal/version.go
localai-org-maint-bot f01589d98b fix(oci): identify signature verification requests (#11244)
Signed backend verification performs separate registry requests for manifests and referrers. Reuse LocalAI's version-aware User-Agent there so the full install flow is attributable to LocalAI.

Assisted-by: Codex:gpt-5

Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
2026-07-31 09:20:26 +02:00

19 lines
346 B
Go

package internal
import "fmt"
var Version = ""
var Commit = ""
func PrintableVersion() string {
return fmt.Sprintf("%s (%s)", Version, Commit)
}
// UserAgent returns the version-aware client identity used for outbound requests.
func UserAgent() string {
if Version == "" {
return "LocalAI"
}
return fmt.Sprintf("LocalAI/%s", Version)
}