BUGFIX: to product 用户未输入prompt时,出现空指针
This commit is contained in:
@@ -403,11 +403,11 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
StringBuilder sb = new StringBuilder("The best quality, masterpiece, real image.");
|
||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||
prompt = pythonService.promptTranslate(prompt);
|
||||
}
|
||||
|
||||
String[] words = prompt.split("\\s+");
|
||||
if (words.length > 180) {
|
||||
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
||||
String[] words = prompt.split("\\s+");
|
||||
if (words.length > 180) {
|
||||
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
||||
}
|
||||
}
|
||||
|
||||
toProductImageRecord.setCreateTime(LocalDateTime.now());
|
||||
|
||||
Reference in New Issue
Block a user