Skip to content

Commit

Permalink
Allow to disable guessing
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler committed Jun 8, 2024
1 parent 1220bf6 commit edbc171
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/config/guesser.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package config

import (
"os"
"path/filepath"

"github.com/rs/zerolog/log"
Expand All @@ -25,6 +26,11 @@ var defaultsTemplate map[familyType]TemplateConfig = map[familyType]TemplateConf

func guessDefaultsFromFile(cfg *BackendConfig, modelPath string) {

if os.Getenv("LOCALAI_DISABLE_GUESSING") == "true" {
log.Debug().Msgf("guessDefaultsFromFile: %s", "guessing disabled with LOCALAI_DISABLE_GUESSING")
return
}

if modelPath == "" {
log.Debug().Msgf("guessDefaultsFromFile: %s", "modelPath is empty")
return
Expand Down

0 comments on commit edbc171

Please sign in to comment.