mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-18 23:18:10 +00:00
feat(ui): detect model usage and display link (#4864)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
committed by
GitHub
parent
28fb8e607a
commit
5b19af99ff
@ -400,6 +400,15 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
|
||||
cfg.Debug = &trueV
|
||||
}
|
||||
|
||||
if len(cfg.KnownUsecaseStrings) == 0 {
|
||||
// Infer use case if not provided
|
||||
for k, usecase := range GetAllBackendConfigUsecases() {
|
||||
if cfg.HasUsecases(usecase) {
|
||||
cfg.KnownUsecaseStrings = append(cfg.KnownUsecaseStrings, k)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
guessDefaultsFromFile(cfg, lo.modelPath)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user