fix: fullURL endpoint generation (#817)

This commit is contained in:
eiixy
2024-08-17 01:11:38 +08:00
committed by GitHub
parent 2c6889e081
commit dd7f5824f9
14 changed files with 244 additions and 51 deletions

View File

@@ -122,8 +122,13 @@ func (c *Client) callAudioAPI(
}
urlSuffix := fmt.Sprintf("/audio/%s", endpointSuffix)
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix, request.Model),
withBody(&formBody), withContentType(builder.FormDataContentType()))
req, err := c.newRequest(
ctx,
http.MethodPost,
c.fullURL(urlSuffix, withModel(request.Model)),
withBody(&formBody),
withContentType(builder.FormDataContentType()),
)
if err != nil {
return AudioResponse{}, err
}