Unverified Commit e6b3648b authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

Merge pull request #616 from jmorganca/mxyng/fix-model-name

parents c38ec5be 0625e805
...@@ -127,13 +127,9 @@ func RunHandler(cmd *cobra.Command, args []string) error { ...@@ -127,13 +127,9 @@ func RunHandler(cmd *cobra.Command, args []string) error {
return err return err
} }
modelName, modelTag, ok := strings.Cut(args[0], ":") canonicalModelPath := server.ParseModelPath(args[0])
if !ok {
modelTag = "latest"
}
for _, model := range models.Models { for _, model := range models.Models {
if model.Name == strings.Join([]string{modelName, modelTag}, ":") { if model.Name == canonicalModelPath.GetShortTagname() {
return RunGenerate(cmd, args) return RunGenerate(cmd, args)
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment