From c9615e0cbe3b68088ee04221acdfde63d6d20766 Mon Sep 17 00:00:00 2001 From: "xuanming.zhang" Date: Wed, 3 Jan 2024 19:42:57 +0800 Subject: [PATCH] Added support for createImage Azure models (#608) --- image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image.go b/image.go index 4fe8b3a..afd4e19 100644 --- a/image.go +++ b/image.go @@ -68,7 +68,7 @@ type ImageResponseDataInner struct { // CreateImage - API call to create an image. This is the main endpoint of the DALL-E API. func (c *Client) CreateImage(ctx context.Context, request ImageRequest) (response ImageResponse, err error) { urlSuffix := "/images/generations" - req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request)) + req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix, request.Model), withBody(request)) if err != nil { return }