|
|
@@ -92,6 +92,9 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
imagineParam.put("base64Array", base64Array);
|
|
|
}
|
|
|
SubmitResult result = submit(user.getMode(),"imagine", null,imagineParam);
|
|
|
+ if (user.getMode() == 2) {
|
|
|
+ redisService.hincr(RedisService.key.MIDJOURNEY_ACCOUNT.getName(), result.getInstanceId().toString(), 1.0);
|
|
|
+ }
|
|
|
return saveConversation(user.getId(), user.getMode(),result,"IMAGINE", StringUtils.EMPTY, botType);
|
|
|
}
|
|
|
|
|
|
@@ -122,6 +125,9 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
.put("base64", base64)
|
|
|
.build();
|
|
|
SubmitResult result = submit(user.getMode(),"describe", null, param);
|
|
|
+ if (user.getMode() == 2) {
|
|
|
+ redisService.hincr(RedisService.key.MIDJOURNEY_ACCOUNT.getName(), result.getInstanceId().toString(), 1.0);
|
|
|
+ }
|
|
|
return saveConversation(user.getId(), user.getMode(),result,"DESCRIBE", StringUtils.EMPTY, botType);
|
|
|
}
|
|
|
|
|
|
@@ -135,6 +141,9 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
param.put("dimensions", dimensions);
|
|
|
}
|
|
|
SubmitResult result = submit(user.getMode(),"blend", null, param);
|
|
|
+ if (user.getMode() == 2) {
|
|
|
+ redisService.hincr(RedisService.key.MIDJOURNEY_ACCOUNT.getName(), result.getInstanceId().toString(), 1.0);
|
|
|
+ }
|
|
|
return saveConversation(user.getId(), user.getMode(),result,"BLEND", StringUtils.EMPTY, botType);
|
|
|
}
|
|
|
|
|
|
@@ -151,6 +160,9 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
param.put("maskBase64", maskBase64);
|
|
|
}
|
|
|
SubmitResult result = submit(user.getMode(),"modal", null, param);
|
|
|
+ if (user.getMode() == 2) {
|
|
|
+ redisService.hincr(RedisService.key.MIDJOURNEY_ACCOUNT.getName(), result.getInstanceId().toString(), 1.0);
|
|
|
+ }
|
|
|
return saveConversation(user.getId(), user.getMode(),result,"MODAL", StringUtils.EMPTY, StringUtils.EMPTY);
|
|
|
}
|
|
|
|
|
|
@@ -161,6 +173,9 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
.put("state", user.getId())
|
|
|
.build();
|
|
|
SubmitResult result = submit(user.getMode(),"shorten", null, param);
|
|
|
+ if (user.getMode() == 2) {
|
|
|
+ redisService.hincr(RedisService.key.MIDJOURNEY_ACCOUNT.getName(), result.getInstanceId().toString(), 1.0);
|
|
|
+ }
|
|
|
return saveConversation(user.getId(), user.getMode(), result,"SHORTEN", StringUtils.EMPTY, botType);
|
|
|
}
|
|
|
|