|
|
@@ -673,14 +673,17 @@ public class AiHookServiceImpl implements AiHookService {
|
|
|
}
|
|
|
|
|
|
}else {
|
|
|
- String sa = contentKh.replaceAll("】\n", "】").replaceAll("\n【", "【");
|
|
|
- String nr = replace(sa);
|
|
|
- String[] split = nr.split("\n");
|
|
|
- if (split.length>6){
|
|
|
- log.info("回复长度异常:"+role.getRoleId()+":"+qwExternalContacts.getName());
|
|
|
- notifyArtificial(fastGptChatSession.getSessionId(),user,qwExternalContacts.getName(),"回复长度异常",qwExternalContacts.getId(),sender);
|
|
|
- return R.ok();
|
|
|
+ if(!isNewVersion){
|
|
|
+ String sa = contentKh.replaceAll("】\n", "】").replaceAll("\n【", "【");
|
|
|
+ String nr = replace(sa);
|
|
|
+ String[] split = nr.split("\n");
|
|
|
+ if (split.length>6){
|
|
|
+ log.info("回复长度异常:"+role.getRoleId()+":"+qwExternalContacts.getName());
|
|
|
+ notifyArtificial(fastGptChatSession.getSessionId(),user,qwExternalContacts.getName(),"回复长度异常",qwExternalContacts.getId(),sender);
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
List<String> countList = countString(content);
|
|
|
//新增用户信息
|
|
|
addUserInfo(contentKh, qwExternalContacts.getId(),fastGptChatSession);
|