fix: ali image model cannot be found and the error with the incorrect return format.

This commit is contained in:
mlkt
2024-05-26 02:52:22 +08:00
parent e9981fff36
commit 076ec68989
3 changed files with 8 additions and 2 deletions

View File

@@ -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