|
|
@@ -172,6 +172,15 @@ func DoMidjourneyHttpRequest(c *gin.Context, timeout time.Duration, fullRequestU
|
|
|
//req, err := http.NewRequest(c.Request.Method, fullRequestURL, requestBody)
|
|
|
// make new request with mapResult
|
|
|
}
|
|
|
+ if constant.MjModeClearEnabled {
|
|
|
+ if prompt, ok := mapResult["prompt"].(string); ok {
|
|
|
+ prompt = strings.Replace(prompt, "--fast", "", -1)
|
|
|
+ prompt = strings.Replace(prompt, "--relax", "", -1)
|
|
|
+ prompt = strings.Replace(prompt, "--turbo", "", -1)
|
|
|
+
|
|
|
+ mapResult["prompt"] = prompt
|
|
|
+ }
|
|
|
+ }
|
|
|
reqBody, err := json.Marshal(mapResult)
|
|
|
if err != nil {
|
|
|
return MidjourneyErrorWithStatusCodeWrapper(constant.MjErrorUnknown, "marshal_request_body_failed", http.StatusInternalServerError), nullBytes, err
|