Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler committed Nov 11, 2024
1 parent 55509d3 commit 20b6d16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/http/endpoints/openai/realtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func newModel(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *
// If we don't have Wrapped model definitions, just return a standard model
opts := backend.ModelOptions(*cfg, appConfig, model.WithBackendString(cfg.Backend),
model.WithModel(cfg.Model))
return ml.BackendLoader(opts...)
return ml.Load(opts...)
}

log.Debug().Msg("Loading a wrapped model")
Expand Down Expand Up @@ -174,19 +174,19 @@ func newModel(cl *config.BackendConfigLoader, ml *model.ModelLoader, appConfig *
}

opts := backend.ModelOptions(*cfgTTS, appConfig)
ttsClient, err := ml.BackendLoader(opts...)
ttsClient, err := ml.Load(opts...)
if err != nil {
return nil, fmt.Errorf("failed to load tts model: %w", err)
}

opts = backend.ModelOptions(*cfgSST, appConfig)
transcriptionClient, err := ml.BackendLoader(opts...)
transcriptionClient, err := ml.Load(opts...)
if err != nil {
return nil, fmt.Errorf("failed to load SST model: %w", err)
}

opts = backend.ModelOptions(*cfgLLM, appConfig)
llmClient, err := ml.BackendLoader(opts...)
llmClient, err := ml.Load(opts...)
if err != nil {
return nil, fmt.Errorf("failed to load LLM model: %w", err)
}
Expand Down

0 comments on commit 20b6d16

Please sign in to comment.