|
@@ -132,7 +132,7 @@ public class SecondGoodsController {
|
|
|
* 文本审核接口 - 商品发布场景
|
|
|
*/
|
|
|
@GetMapping("/textModeration/productPublish")
|
|
|
- @ApiOperation("文本审核 - 商品发布场景(大语言模型输入文字检测、广告法合规检测_专业版、URL风险链接检测)")
|
|
|
+ @ApiOperation("文本审核 - 商品发布场景(大语言模型输入文字检测、广告法合规检测_专业版)")
|
|
|
public R<TextModerationResultVO> productPublishTextModeration(@ApiParam("待审核文本") @RequestParam String text) {
|
|
|
log.info("SecondGoodsController.productPublishTextModeration?text={}", text);
|
|
|
try {
|
|
@@ -151,13 +151,12 @@ public class SecondGoodsController {
|
|
|
* 文本审核接口 - 聊一聊场景
|
|
|
*/
|
|
|
@GetMapping("/textModeration/chat")
|
|
|
- @ApiOperation("文本审核 - 聊一聊场景(私聊互动内容检测_专业版、广告法合规检测_专业版、URL风险链接检测)")
|
|
|
+ @ApiOperation("文本审核 - 聊一聊场景(私聊互动内容检测_专业版、广告法合规检测_专业版)")
|
|
|
public R<TextModerationResultVO> chatTextModeration(@ApiParam("待审核文本") @RequestParam String text) {
|
|
|
log.info("SecondGoodsController.chatTextModeration?text={}", text);
|
|
|
try {
|
|
|
List<String> servicesList = Lists.newArrayList();
|
|
|
servicesList.add(TextReviewServiceEnum.AD_COMPLIANCE_DETECTION_PRO.getService());
|
|
|
- servicesList.add(TextReviewServiceEnum.URL_DETECTION.getService());
|
|
|
servicesList.add(TextReviewServiceEnum.CHAT_DETECTION_PRO.getService());
|
|
|
TextModerationResultVO textModerationResultVO = textModerationUtil.invokeFunction(text,servicesList);
|
|
|
return R.data(textModerationResultVO);
|
|
@@ -171,13 +170,12 @@ public class SecondGoodsController {
|
|
|
* 文本审核接口 - 评论场景
|
|
|
*/
|
|
|
@GetMapping("/textModeration/comment")
|
|
|
- @ApiOperation("文本审核 - 评论场景(公聊评论内容检测_专业版、广告法合规检测_专业版、URL风险链接检测)")
|
|
|
+ @ApiOperation("文本审核 - 评论场景(公聊评论内容检测_专业版、广告法合规检测_专业版)")
|
|
|
public R<TextModerationResultVO> commentTextModeration(@ApiParam("待审核文本") @RequestParam String text) {
|
|
|
log.info("SecondGoodsController.commentTextModeration?text={}", text);
|
|
|
try {
|
|
|
List<String> servicesList = Lists.newArrayList();
|
|
|
servicesList.add(TextReviewServiceEnum.AD_COMPLIANCE_DETECTION_PRO.getService());
|
|
|
- servicesList.add(TextReviewServiceEnum.URL_DETECTION.getService());
|
|
|
servicesList.add(TextReviewServiceEnum.CHAT_DETECTION_PRO.getService());
|
|
|
TextModerationResultVO textModerationResultVO = textModerationUtil.invokeFunction(text,servicesList);
|
|
|
return R.data(textModerationResultVO);
|
|
@@ -191,11 +189,15 @@ public class SecondGoodsController {
|
|
|
* 图片审核接口 - 发布商品场景
|
|
|
*/
|
|
|
@GetMapping("/imageModeration/productPublish")
|
|
|
- @ApiOperation("图片审核 - 发布商品场景(内容治理检测、AIGC图片风险检测、图片万物识别)")
|
|
|
+ @ApiOperation("图片审核 - 发布商品场景(内容治理检测、AIGC图片风险检测)")
|
|
|
public R<ImageModerationResultVO> productPublishImageModeration(@ApiParam("图片地址") @RequestParam String imageUrl) {
|
|
|
log.info("SecondGoodsController.productPublishImageModeration?imageUrl={}", imageUrl);
|
|
|
try {
|
|
|
- ImageModerationResultVO response = imageModerationUtil.productPublishCheck(imageUrl);
|
|
|
+ List<String> servicesList = Lists.newArrayList();
|
|
|
+ // TODO 后续配置到数据库 中
|
|
|
+ servicesList.add(ImageReviewServiceEnum.TONALITY_IMPROVE.getService());
|
|
|
+ servicesList.add(ImageReviewServiceEnum.AIGC_CHECK.getService());
|
|
|
+ ImageModerationResultVO response = imageModerationUtil.productPublishCheck(imageUrl,servicesList);
|
|
|
return R.data(response);
|
|
|
} catch (Exception e) {
|
|
|
log.error("图片审核异常", e);
|
|
@@ -207,11 +209,14 @@ public class SecondGoodsController {
|
|
|
* 图片审核接口 - 聊一聊场景
|
|
|
*/
|
|
|
@GetMapping("/imageModeration/chat")
|
|
|
- @ApiOperation("图片审核 - 聊一聊场景(图片万物识别、内容治理检测)")
|
|
|
+ @ApiOperation("图片审核 - 聊一聊场景(内容治理检测)")
|
|
|
public R<ImageModerationResultVO> chatImageModeration(@ApiParam("图片地址") @RequestParam String imageUrl) {
|
|
|
log.info("SecondGoodsController.chatImageModeration?imageUrl={}", imageUrl);
|
|
|
try {
|
|
|
- ImageModerationResultVO response = imageModerationUtil.chatCheck(imageUrl);
|
|
|
+ List<String> servicesList = Lists.newArrayList();
|
|
|
+ // TODO 后续配置到数据库 中
|
|
|
+ servicesList.add(ImageReviewServiceEnum.TONALITY_IMPROVE.getService());
|
|
|
+ ImageModerationResultVO response = imageModerationUtil.productPublishCheck(imageUrl,servicesList);
|
|
|
return R.data(response, "审核成功");
|
|
|
} catch (Exception e) {
|
|
|
log.error("图片审核异常", e);
|