Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

Add embeddings to API (#1773)

Brian Murray0d6e3565aea3
diff --git a/api/client.go b/api/client.go
index 72da30b8e..4fe8668a3 100644
--- a/api/client.go
+++ b/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 {