allow sha256 blob prefix as well as @

This commit is contained in:
Bruce MacDonald 2024-02-26 13:57:39 -05:00
parent a189810df6
commit 8b87b18dff

View File

@ -307,7 +307,7 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
switch c.Name {
case "model":
if strings.HasPrefix(c.Args, "@") {
if strings.HasPrefix(c.Args, "sha256:") || strings.HasPrefix(c.Args, "@") {
blobPath, err := GetBlobsPath(strings.TrimPrefix(c.Args, "@"))
if err != nil {
return err