Added support for createImage Azure models (#608)

This commit is contained in:
xuanming.zhang
2024-01-03 19:42:57 +08:00
committed by GitHub
parent a09cb0c528
commit c9615e0cbe

View File

@@ -68,7 +68,7 @@ type ImageResponseDataInner struct {
// CreateImage - API call to create an image. This is the main endpoint of the DALL-E API. // 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) { func (c *Client) CreateImage(ctx context.Context, request ImageRequest) (response ImageResponse, err error) {
urlSuffix := "/images/generations" 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 { if err != nil {
return return
} }