Fix the issue that response_format is not set, causing the b64_json parameter to be ignored.

This commit is contained in:
mo 2024-05-27 13:07:30 +08:00
parent c81d7204f4
commit 7ec02bc58f

View File

@ -58,6 +58,7 @@ func RelayImageHelper(c *gin.Context, relayMode int) *relaymodel.ErrorWithStatus
imageModel := imageRequest.Model
// Convert the original image model
imageRequest.Model, _ = getMappedModelName(imageRequest.Model, billingratio.ImageOriginModelName)
c.Set("response_format", imageRequest.ResponseFormat)
var requestBody io.Reader
if isModelMapped || meta.ChannelType == channeltype.Azure { // make Azure channel request body