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.");
|
StringBuilder sb = new StringBuilder("The best quality, masterpiece, real image.");
|
||||||
if (!StringUtil.isNullOrEmpty(prompt)) {
|
if (!StringUtil.isNullOrEmpty(prompt)) {
|
||||||
prompt = pythonService.promptTranslate(prompt);
|
prompt = pythonService.promptTranslate(prompt);
|
||||||
}
|
|
||||||
|
|
||||||
String[] words = prompt.split("\\s+");
|
String[] words = prompt.split("\\s+");
|
||||||
if (words.length > 180) {
|
if (words.length > 180) {
|
||||||
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
throw new BusinessException("Please keep your input text under 200 words. Thanks!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toProductImageRecord.setCreateTime(LocalDateTime.now());
|
toProductImageRecord.setCreateTime(LocalDateTime.now());
|
||||||
|
|||||||
Reference in New Issue
Block a user