From 0b9dbec7fdc290564acdcbf3a3e81f268e8306e5 Mon Sep 17 00:00:00 2001 From: Hai Liang Wang Date: Mon, 20 Jul 2020 11:59:38 +0800 Subject: [PATCH] https://github.com/chatopera/cosin/issues/344 upgrade chatopera sdk, rename faq threshold params --- contact-center/app/pom.xml | 2 +- .../plugins/chatbot/classes/ChatbotEventSubscription.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contact-center/app/pom.xml b/contact-center/app/pom.xml index b909f001..02ff7672 100644 --- a/contact-center/app/pom.xml +++ b/contact-center/app/pom.xml @@ -373,7 +373,7 @@ com.chatopera.bot sdk - 3.0.1 + 3.1.0 diff --git a/public/plugins/chatbot/classes/ChatbotEventSubscription.java b/public/plugins/chatbot/classes/ChatbotEventSubscription.java index c507bfa9..d82f07eb 100644 --- a/public/plugins/chatbot/classes/ChatbotEventSubscription.java +++ b/public/plugins/chatbot/classes/ChatbotEventSubscription.java @@ -59,10 +59,10 @@ public class ChatbotEventSubscription { ChatbotConstants.BOT_PROVIDER, ChatbotConstants.DEFAULT_BOT_PROVIDER); // FAQ最佳回复阀值 - private final static double thresholdFaqBestReply = Double.parseDouble(SystemEnvHelper.getenv( + private final static double faqBestReplyThreshold = Double.parseDouble(SystemEnvHelper.getenv( ChatbotConstants.THRESHOLD_FAQ_BEST_REPLY, "0.8")); // FAQ建议回复阀值 - private final static double thresholdFaqSuggReply = Double.parseDouble(SystemEnvHelper.getenv( + private final static double faqSuggReplyThreshold = Double.parseDouble(SystemEnvHelper.getenv( ChatbotConstants.THRESHOLD_FAQ_SUGG_REPLY, "0.6")); @Autowired @@ -98,7 +98,7 @@ public class ChatbotEventSubscription { com.chatopera.bot.sdk.Chatbot bot = new com.chatopera.bot.sdk.Chatbot( c.getClientId(), c.getSecret(), botServiecProvider); JSONObject result = bot.conversation( - request.getUserid(), request.getMessage(), thresholdFaqBestReply, thresholdFaqSuggReply); + request.getUserid(), request.getMessage(), faqBestReplyThreshold, faqSuggReplyThreshold); // parse response if (result != null) {