fix create model when template detection errors

This commit is contained in:
Michael Yang 2024-06-07 08:55:46 -07:00
parent ce0dc33cb8
commit 030e765e76
7 changed files with 76 additions and 54 deletions

View file

@ -261,7 +261,7 @@ func TestCase(t *testing.T) {
t.Run(tt, func(t *testing.T) {
w := createRequest(t, s.CreateModelHandler, api.CreateRequest{
Name: tt,
Modelfile: fmt.Sprintf("FROM %s", createBinFile(t)),
Modelfile: fmt.Sprintf("FROM %s", createBinFile(t, nil, nil)),
Stream: &stream,
})
@ -277,7 +277,7 @@ func TestCase(t *testing.T) {
t.Run("create", func(t *testing.T) {
w = createRequest(t, s.CreateModelHandler, api.CreateRequest{
Name: strings.ToUpper(tt),
Modelfile: fmt.Sprintf("FROM %s", createBinFile(t)),
Modelfile: fmt.Sprintf("FROM %s", createBinFile(t, nil, nil)),
Stream: &stream,
})