浏览代码

Removed inline parse model path

Daniel Reis 1 年之前
父节点
当前提交
d17730356a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      server/images.go

+ 2 - 1
server/images.go

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