Move the parser back + handle utf16 files (#4533)

This commit is contained in:
Patrick Devine
2024-05-20 11:26:45 -07:00
committed by GitHub
parent 63a453554d
commit ccdf0b2a44
6 changed files with 84 additions and 17 deletions

View File

@@ -35,6 +35,7 @@ import (
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/auth"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/progress"
"github.com/ollama/ollama/server"
"github.com/ollama/ollama/types/errtypes"
@@ -63,7 +64,7 @@ func CreateHandler(cmd *cobra.Command, args []string) error {
}
defer f.Close()
modelfile, err := model.ParseFile(f)
modelfile, err := parser.ParseFile(f)
if err != nil {
return err
}