Files
ollama--ollama/runner/runner.go
T
2026-07-13 11:56:09 +08:00

25 lines
461 B
Go

package runner
import (
"fmt"
"github.com/ollama/ollama/x/imagegen"
"github.com/ollama/ollama/x/mlxrunner"
)
func Execute(args []string) error {
if args[0] == "runner" {
args = args[1:]
}
if len(args) > 0 {
switch args[0] {
case "--imagegen-engine":
return imagegen.Execute(args[1:])
case "--mlx-engine":
return mlxrunner.Execute(args[1:])
}
}
return fmt.Errorf("unknown runner engine, expected --imagegen-engine or --mlx-engine")
}