This commit is contained in:
Blake Mizerany
2024-04-03 20:52:27 -07:00
parent f7cfe946dc
commit 76a202c04e
5 changed files with 99 additions and 97 deletions

View File

@@ -24,7 +24,7 @@ func (c *Client) oclient() *ollama.Client {
}
type PushParams struct {
Uploaded []apitype.CompletePart
CompleteParts []apitype.CompletePart
}
// Push pushes a manifest to the server.
@@ -32,9 +32,9 @@ func (c *Client) Push(ctx context.Context, ref string, manifest []byte, p *PushP
p = cmp.Or(p, &PushParams{})
// TODO(bmizerany): backoff
v, err := ollama.Do[apitype.PushResponse](ctx, c.oclient(), "POST", "/v1/push", &apitype.PushRequest{
Ref: ref,
Manifest: manifest,
Uploaded: p.Uploaded,
Ref: ref,
Manifest: manifest,
CompleteParts: p.CompleteParts,
})
if err != nil {
return nil, err