mirror of
https://github.com/songquanpeng/one-api.git
synced 2026-04-26 19:54:24 +08:00
fix: ali image model cannot be found and the error with the incorrect return format.
This commit is contained in:
@@ -69,7 +69,7 @@ func ConvertEmbeddingRequest(request model.GeneralOpenAIRequest) *EmbeddingReque
|
||||
func ConvertImageRequest(request model.ImageRequest) *ImageRequest {
|
||||
var imageRequest ImageRequest
|
||||
imageRequest.Input.Prompt = request.Prompt
|
||||
imageRequest.Model = request.Model
|
||||
imageRequest.Model = strings.TrimPrefix(request.Model, "ali-")
|
||||
imageRequest.Parameters.Size = strings.Replace(request.Size, "x", "*", -1)
|
||||
imageRequest.Parameters.N = request.N
|
||||
imageRequest.ResponseFormat = request.ResponseFormat
|
||||
|
||||
Reference in New Issue
Block a user