feat(functions/aio): all-in-one images, function template enhancements (#1862)

* feat(startup): allow to specify models from local files

* feat(aio): add Dockerfile, make targets, aio profiles

* feat(template): add Function and LastMessage

* add hermes2-pro-mistral

* update hermes2 definition

* feat(template): add sprig

* feat(template): expose FunctionCall

* feat(aio): switch llm for text
This commit is contained in:
Ettore Di Giacinto 2024-03-21 01:12:20 +01:00 committed by GitHub
parent eeaf8c7ccd
commit e533dcf506
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 462 additions and 2 deletions

View file

@ -60,7 +60,23 @@ func PreloadModelsConfigurations(modelLibraryURL string, modelPath string, model
}
}
default:
log.Warn().Msgf("[startup] failed resolving model '%s'", url)
if _, err := os.Stat(url); err == nil {
log.Debug().Msgf("[startup] resolved local model: %s", url)
// copy to modelPath
md5Name := utils.MD5(url)
modelYAML, err := os.ReadFile(url)
if err != nil {
log.Error().Msgf("error loading model: %s", err.Error())
continue
}
if err := os.WriteFile(filepath.Join(modelPath, md5Name)+".yaml", modelYAML, os.ModePerm); err != nil {
log.Error().Msgf("error loading model: %s", err.Error())
}
} else {
log.Warn().Msgf("[startup] failed resolving model '%s'", url)
}
}
}
}