|
@@ -54,7 +54,6 @@ func oaiImage2AliImageRequest(info *relaycommon.RelayInfo, request dto.ImageRequ
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 检查n参数
|
|
|
|
|
if imageRequest.Parameters.N != 0 {
|
|
if imageRequest.Parameters.N != 0 {
|
|
|
info.PriceData.AddOtherRatio("n", float64(imageRequest.Parameters.N))
|
|
info.PriceData.AddOtherRatio("n", float64(imageRequest.Parameters.N))
|
|
|
}
|
|
}
|
|
@@ -328,7 +327,6 @@ func aliImageHandler(a *Adaptor, c *gin.Context, resp *http.Response, info *rela
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
imageResponses := responseAli2OpenAIImage(c, aliResponse, originRespBody, info, responseFormat)
|
|
imageResponses := responseAli2OpenAIImage(c, aliResponse, originRespBody, info, responseFormat)
|
|
|
- // 可能生成多张图片,修正计费数量n
|
|
|
|
|
if aliResponse.Usage.ImageCount != 0 {
|
|
if aliResponse.Usage.ImageCount != 0 {
|
|
|
info.PriceData.AddOtherRatio("n", float64(aliResponse.Usage.ImageCount))
|
|
info.PriceData.AddOtherRatio("n", float64(aliResponse.Usage.ImageCount))
|
|
|
} else if len(imageResponses.Data) != 0 {
|
|
} else if len(imageResponses.Data) != 0 {
|