Commit 0625e805 authored by Michael Yang's avatar Michael Yang
Browse files

fix model name not matching

parent c38ec5be
...@@ -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