returnerrorWrapper(errors.New("prompt is required"),"required_field_missing",http.StatusBadRequest)
returnservice.OpenAIErrorWrapper(errors.New("prompt is required"),"required_field_missing",http.StatusBadRequest)
}
}
ifstrings.Contains(imageRequest.Size,"×"){
ifstrings.Contains(imageRequest.Size,"×"){
returnerrorWrapper(errors.New("size an unexpected error occurred in the parameter, please use 'x' instead of the multiplication sign '×'"),"invalid_field_value",http.StatusBadRequest)
returnservice.OpenAIErrorWrapper(errors.New("size an unexpected error occurred in the parameter, please use 'x' instead of the multiplication sign '×'"),"invalid_field_value",http.StatusBadRequest)
returnerrorWrapper(errors.New("size must be one of 256x256, 512x512, or 1024x1024, dall-e-3 1024x1792 or 1792x1024"),"invalid_field_value",http.StatusBadRequest)
returnservice.OpenAIErrorWrapper(errors.New("size must be one of 256x256, 512x512, or 1024x1024, dall-e-3 1024x1792 or 1792x1024"),"invalid_field_value",http.StatusBadRequest)
returnerrorWrapper(errors.New("size must be one of 256x256, 512x512, or 1024x1024, dall-e-3 1024x1792 or 1792x1024"),"invalid_field_value",http.StatusBadRequest)
returnservice.OpenAIErrorWrapper(errors.New("size must be one of 256x256, 512x512, or 1024x1024, dall-e-3 1024x1792 or 1792x1024"),"invalid_field_value",http.StatusBadRequest)
}
}
ifimageRequest.N!=1{
ifimageRequest.N!=1{
returnerrorWrapper(errors.New("n must be 1"),"invalid_field_value",http.StatusBadRequest)
returnservice.OpenAIErrorWrapper(errors.New("n must be 1"),"invalid_field_value",http.StatusBadRequest)