Removed inline parse model path

This commit is contained in:
Daniel Reis 2023-11-09 22:44:26 +00:00
parent 32d79a6eea
commit d17730356a

View file

@ -918,7 +918,8 @@ func ShowModelfile(model *Model) (string, error) {
mt.From = model.ModelPath mt.From = model.ModelPath
if model.OriginalModel != "" { if model.OriginalModel != "" {
mt.From = ParseModelPath(model.OriginalModel).GetShortTagname() mp := ParseModelPath(model.OriginalModel)
mt.From = mp.GetShortTagname()
} }
modelFile := `# Modelfile generated by "ollama show" modelFile := `# Modelfile generated by "ollama show"