mirror of
https://github.com/mudler/LocalAI.git
synced 2026-08-01 11:00:24 -04:00
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>
19 lines
346 B
Go
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)
|
|
}
|