mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
#467 支持知识库多答案
This commit is contained in:
parent
42a26de6ce
commit
73d8c52116
@ -111,7 +111,7 @@
|
||||
|
||||
## 产品文档
|
||||
|
||||
关于产品的具体使用说明,请参考[文档中心](https://docs.chatopera.com)。
|
||||
关于产品的具体使用说明,请参考[文档中心](https://docs.chatopera.com/products/cskefu/index.html)。
|
||||
|
||||
### 产品截图
|
||||
|
||||
@ -412,7 +412,7 @@ Chatopera 机器人平台包括知识库、多轮对话、意图识别和语音
|
||||
|
||||
| Avatar | Name | GitHub | Talk | Intro. |
|
||||
| ------------------------------------------------------------------------------------------------- | ---- | --------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <img src="https://user-images.githubusercontent.com/3538629/133258206-87b56121-dd01-4ea5-aaf2-a3777a71b59a.jpg" width="100"> | 刘勇 | [lecjy](https://github.com/lecjy) | [报道](http://www.ctiforum.com/news/guonei/579599.html) | 目前工作于湖北武汉一个电商企业,曾就职于京东海外电商平台,负责客户系统维护,对于电商客服领域有丰富的工作经验,尤其是面向东南亚出海业务。 |
|
||||
| <img src="https://static-public.chatopera.com/assets/images/cskefu/github_lecjy.jpg" width="100"> | 刘勇 | [lecjy](https://github.com/lecjy) | [报道](http://www.ctiforum.com/news/guonei/579599.html) | 目前工作于湖北武汉一个电商企业,曾就职于京东海外电商平台,负责客户系统维护,对于电商客服领域有丰富的工作经验,尤其是面向东南亚出海业务。 |
|
||||
|
||||
寻找基于春松客服搭建智能客服系统的客户,包括但不限于部署、系统集成和定制开发等,可以优先考虑联系以上认证开发者,Chatopera 团队会持续维护基础模块、云服务和机器人客服,提升春松客服上利用人工智能、机器学习和自动化流程服务。
|
||||
|
||||
|
@ -31,7 +31,7 @@ import java.util.List;
|
||||
@Table(name = "uk_chat_message")
|
||||
@Document(indexName = "cskefu", type = "chat_message")
|
||||
@org.hibernate.annotations.Proxy(lazy = false)
|
||||
public class ChatMessage implements java.io.Serializable {
|
||||
public class ChatMessage implements java.io.Serializable, Cloneable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -518,4 +518,14 @@ public class ChatMessage implements java.io.Serializable {
|
||||
public void setIntervented(boolean intervented) {
|
||||
this.intervented = intervented;
|
||||
}
|
||||
|
||||
public Object clone() {
|
||||
ChatMessage copy = null;
|
||||
try {
|
||||
copy = (ChatMessage) super.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
|
@ -248,7 +248,28 @@ public class ChatbotEventSubscription {
|
||||
// 保存并发送
|
||||
if (MainContext.ChannelType.WEBIM.toString().equals(resp.getChannel())) {
|
||||
// WEBIM 渠道
|
||||
chatbotProxy.saveAndPublish(resp);
|
||||
if (StringUtils.equals(resp.getMessage(), "{CLEAR} 混合类型消息") || StringUtils.equals(resp.getMessage(), "{CLEAR} 图文消息")) {
|
||||
JSONArray params = data.getJSONArray("params");
|
||||
for (int i = 0; i < params.length(); i++) {
|
||||
JSONObject item = params.getJSONObject(i);
|
||||
ChatMessage itemResp = (ChatMessage) resp.clone();
|
||||
itemResp.setExpmsg(null);
|
||||
if (item.getString("type").equals("plain")) {
|
||||
itemResp.setMessage(item.getString("content"));
|
||||
chatbotProxy.saveAndPublish(itemResp);
|
||||
} else if (item.getString("type").equals("card")) {
|
||||
if (item.has("thumbnail")) {
|
||||
item.put("thumbnail", ChatbotConstants.DEFAULT_BOT_PROVIDER + item.getString("thumbnail"));
|
||||
}
|
||||
JSONArray expmsg = new JSONArray();
|
||||
expmsg.put(item);
|
||||
itemResp.setExpmsg(expmsg.toString());
|
||||
chatbotProxy.saveAndPublish(itemResp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
chatbotProxy.saveAndPublish(resp);
|
||||
}
|
||||
} else {
|
||||
// 其他渠道
|
||||
chatMessageRes.save(resp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user