|
|
@@ -30,6 +30,7 @@ import com.tzld.longarticle.recommend.server.repository.longArticle.ArticleCateg
|
|
|
import com.tzld.longarticle.recommend.server.repository.longArticle.ArticleCrawlerPlanRepository;
|
|
|
import com.tzld.longarticle.recommend.server.repository.longArticle.ArticlePoolPromotionSourceRepository;
|
|
|
import com.tzld.longarticle.recommend.server.util.DateUtils;
|
|
|
+import com.tzld.longarticle.recommend.server.util.JSONUtils;
|
|
|
import com.tzld.longarticle.recommend.server.util.Md5Util;
|
|
|
import com.tzld.longarticle.recommend.server.util.TitleSimilarCheckUtil;
|
|
|
import com.tzld.longarticle.recommend.server.util.page.Page;
|
|
|
@@ -119,11 +120,7 @@ public class ArticleCategoryService {
|
|
|
long now = System.currentTimeMillis();
|
|
|
JSONObject obj = null;
|
|
|
if (kimiResult.isSuccess()) {
|
|
|
- try {
|
|
|
- obj = JSONObject.parseObject(kimiResult.getResponse().getChoices().get(0).getMessage().getContent());
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(kimiResult.getResponse().getChoices().get(0).getMessage().getContent());
|
|
|
- }
|
|
|
+ obj = JSONUtils.parseAIJsonContent(kimiResult.getResponse().getChoices().get(0).getMessage().getContent());
|
|
|
}
|
|
|
for (ArticleCategory articleCategory : partition) {
|
|
|
articleCategory.setKimiResult(kimiResult.getResponseStr().trim());
|
|
|
@@ -350,11 +347,7 @@ public class ArticleCategoryService {
|
|
|
long now = System.currentTimeMillis();
|
|
|
JSONObject obj = null;
|
|
|
if (kimiResult.isSuccess()) {
|
|
|
- try {
|
|
|
- obj = JSONObject.parseObject(kimiResult.getResponse().getChoices().get(0).getMessage().getContent());
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(kimiResult.getResponse().getChoices().get(0).getMessage().getContent());
|
|
|
- }
|
|
|
+ obj = JSONUtils.parseAIJsonContent(kimiResult.getResponse().getChoices().get(0).getMessage().getContent());
|
|
|
}
|
|
|
articleCategory.setKimiResult(kimiResult.getResponseStr().trim());
|
|
|
articleCategory.setUpdateTimestamp(now);
|