소스 검색

add prompt back to parser

Jeffrey Morgan 1 년 전
부모
커밋
d59b164fa2
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      parser/parser.go
  2. 1 1
      server/images.go

+ 1 - 1
parser/parser.go

@@ -39,7 +39,7 @@ func Parse(reader io.Reader) ([]Command, error) {
 			command.Args = string(fields[1])
 			command.Args = string(fields[1])
 			// copy command for validation
 			// copy command for validation
 			modelCommand = command
 			modelCommand = command
-		case "LICENSE", "TEMPLATE", "SYSTEM":
+		case "LICENSE", "TEMPLATE", "SYSTEM", "PROMPT":
 			command.Name = string(bytes.ToLower(fields[0]))
 			command.Name = string(bytes.ToLower(fields[0]))
 			command.Args = string(fields[1])
 			command.Args = string(fields[1])
 		case "PARAMETER":
 		case "PARAMETER":

+ 1 - 1
server/images.go

@@ -250,7 +250,7 @@ func CreateModel(name string, path string, fn func(status string)) error {
 					layers = append(layers, newLayer)
 					layers = append(layers, newLayer)
 				}
 				}
 			}
 			}
-		case "license", "template", "system":
+		case "license", "template", "system", "prompt":
 			fn(fmt.Sprintf("creating %s layer", c.Name))
 			fn(fmt.Sprintf("creating %s layer", c.Name))
 			// remove the prompt layer if one exists
 			// remove the prompt layer if one exists
 			mediaType := fmt.Sprintf("application/vnd.ollama.image.%s", c.Name)
 			mediaType := fmt.Sprintf("application/vnd.ollama.image.%s", c.Name)