mirror of
https://github.com/mudler/LocalAI.git
synced 2024-06-07 19:40:48 +00:00
Small fixup to template loading
This commit is contained in:
parent
b710147b95
commit
4a932483e1
@ -62,6 +62,7 @@ func (ml *ModelLoader) LoadModel(modelName string, opts ...llama.ModelOption) (*
|
||||
if _, err := os.Stat(modelBin); os.IsNotExist(err) {
|
||||
return nil, err
|
||||
} else {
|
||||
modelName = fmt.Sprintf("%s.bin", modelName)
|
||||
modelFile = modelBin
|
||||
}
|
||||
}
|
||||
@ -87,7 +88,7 @@ func (ml *ModelLoader) LoadModel(modelName string, opts ...llama.ModelOption) (*
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ml.promptsTemplates[modelFile] = tmpl
|
||||
ml.promptsTemplates[modelName] = tmpl
|
||||
}
|
||||
|
||||
ml.models[modelFile] = model
|
||||
|
Loading…
Reference in New Issue
Block a user