diff --git a/chat/core/src/main/java/com/tencent/supersonic/chat/core/knowledge/MultiCustomDictionary.java b/chat/core/src/main/java/com/tencent/supersonic/chat/core/knowledge/MultiCustomDictionary.java index 1240e7299..cda2fdde1 100644 --- a/chat/core/src/main/java/com/tencent/supersonic/chat/core/knowledge/MultiCustomDictionary.java +++ b/chat/core/src/main/java/com/tencent/supersonic/chat/core/knowledge/MultiCustomDictionary.java @@ -353,7 +353,7 @@ public class MultiCustomDictionary extends DynamicCustomDictionary { } - public boolean insert(String word, String natureWithFrequency) { + public synchronized boolean insert(String word, String natureWithFrequency) { if (word == null) { return false; } else {