mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +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:
parent
28fb8e607a
commit
5b19af99ff
2 changed files with 22 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue