mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 16:26:59 +00:00
Update the /api/create endpoint to use JSON (#7935)
Replaces `POST /api/create` to use JSON instead of a Modelfile. This is a breaking change.
This commit is contained in:
@@ -2,7 +2,6 @@ package server
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"slices"
|
||||
"testing"
|
||||
@@ -31,9 +30,11 @@ func TestList(t *testing.T) {
|
||||
|
||||
var s Server
|
||||
for _, n := range expectNames {
|
||||
_, digest := createBinFile(t, nil, nil)
|
||||
|
||||
createRequest(t, s.CreateHandler, api.CreateRequest{
|
||||
Name: n,
|
||||
Modelfile: fmt.Sprintf("FROM %s", createBinFile(t, nil, nil)),
|
||||
Name: n,
|
||||
Files: map[string]string{"test.gguf": digest},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user