mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-08 20:25:22 +00:00
fix model name not matching
This commit is contained in:
parent
c38ec5befb
commit
0625e805f0
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user