Sfoglia il codice sorgente

相似度评分增加配置

wangyunpeng 9 mesi fa
parent
commit
1bd7885e72

+ 3 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/remote/NLPRemoteService.java

@@ -37,6 +37,8 @@ public class NLPRemoteService {
     private String chatId;
     @ApolloJsonValue("${score.interest.type:{}}")
     private Map<String, String> accountScoreInterestTypeMap;
+    @ApolloJsonValue("${score.sim.type:{}}")
+    private Map<String, String> accountScoreSimTypeMap;
     @ApolloJsonValue("${score.viewCount.filter:{}}")
     private Map<String, Integer> accountScoreViewCountFilterMap;
     @ApolloJsonValue("${score.min.time:{}}")
@@ -55,7 +57,7 @@ public class NLPRemoteService {
         bodyParam.put("account_nickname_list", Collections.singletonList(accountName));
         bodyParam.put("text_list", titleList);
         bodyParam.put("interest_type", accountScoreInterestTypeMap.getOrDefault(accountName, "avg"));
-        bodyParam.put("sim_type", "mean");
+        bodyParam.put("sim_type", accountScoreSimTypeMap.getOrDefault(accountName, "mean"));
         bodyParam.put("rate", 0.1);
         if (accountScoreViewCountFilterMap.containsKey(accountName)) {
             bodyParam.put("view_count_filter", accountScoreViewCountFilterMap.get(accountName));