mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(chat) Fix the issue of dimension values being cleared and unable to be parsed (#1703)
This commit is contained in:
@@ -52,7 +52,7 @@ public class KnowledgeBaseService {
|
||||
updateOnlineKnowledge(natures);
|
||||
}
|
||||
|
||||
public void updateOnlineKnowledge(List<DictWord> natures) {
|
||||
private void updateOnlineKnowledge(List<DictWord> natures) {
|
||||
try {
|
||||
updateSemanticKnowledge(natures);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.tencent.supersonic.headless.api.pojo.SchemaElementType;
|
||||
import com.tencent.supersonic.headless.api.pojo.SemanticSchema;
|
||||
import com.tencent.supersonic.headless.chat.knowledge.DictWord;
|
||||
import com.tencent.supersonic.headless.chat.knowledge.KnowledgeBaseService;
|
||||
import com.tencent.supersonic.headless.chat.knowledge.SearchService;
|
||||
import com.tencent.supersonic.headless.chat.knowledge.builder.WordBuilderFactory;
|
||||
import com.tencent.supersonic.headless.server.service.SchemaService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -44,8 +43,7 @@ public class DictWordService {
|
||||
return;
|
||||
}
|
||||
setPreDictWords(dictWords);
|
||||
SearchService.clear();
|
||||
knowledgeBaseService.updateOnlineKnowledge(getAllDictWords());
|
||||
knowledgeBaseService.reloadAllData(getAllDictWords());
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
log.info("Dictionary has been regularly reloaded in {} milliseconds", duration);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ public class QueryStructUtils {
|
||||
private final DateModeUtils dateModeUtils;
|
||||
private final SqlFilterUtils sqlFilterUtils;
|
||||
private final SchemaService schemaService;
|
||||
private String variablePrefix = "'${";
|
||||
|
||||
public QueryStructUtils(
|
||||
DateModeUtils dateModeUtils,
|
||||
|
||||
Reference in New Issue
Block a user