Brian Murray
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
0 deletions
-
api/client.go
|
|
|
@ -309,6 +309,13 @@ func (c *Client) Heartbeat(ctx context.Context) error { |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
func (c *Client) Embeddings(ctx context.Context, req *EmbeddingRequest) (*EmbeddingResponse, error) { |
|
|
|
var resp EmbeddingResponse |
|
|
|
if err := c.do(ctx, http.MethodPost, "/api/embeddings", req, &resp); err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
return &resp, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (c *Client) CreateBlob(ctx context.Context, digest string, r io.Reader) error { |
|
|
|
if err := c.do(ctx, http.MethodHead, fmt.Sprintf("/api/blobs/%s", digest), nil, nil); err != nil { |
|
|
|
|