chore: simplify passing options to ModelOptions

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-11-07 10:11:39 +01:00
parent f157314fb8
commit 6e468e9b8e

View File

@ -129,10 +129,8 @@ func newModel(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *
if cfg.Pipeline.LLM == "" || cfg.Pipeline.TTS == "" || cfg.Pipeline.Transcription == "" {
// If we don't have Wrapped model definitions, just return a standard model
opts := backend.ModelOptions(*cfg, appConfig, []model.Option{
model.WithBackendString(cfg.Backend),
model.WithModel(cfg.Model),
})
opts := backend.ModelOptions(*cfg, appConfig, model.WithBackendString(cfg.Backend),
model.WithModel(cfg.Model))
return ml.BackendLoader(opts...)
}