Skip to content

Commit

Permalink
(improvement)(chat) Fix the issue of dimension values being cleared a…
Browse files Browse the repository at this point in the history
…nd unable to be parsed (#1703)
  • Loading branch information
lexluo09 authored Sep 23, 2024
1 parent 4ef5719 commit dbea1e7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void reloadAllData(List<DictWord> natures) {
updateOnlineKnowledge(natures);
}

public void updateOnlineKnowledge(List<DictWord> natures) {
private void updateOnlineKnowledge(List<DictWord> natures) {
try {
updateSemanticKnowledge(natures);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
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;
Expand Down Expand Up @@ -44,8 +43,7 @@ public void reloadDictWord() {
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dbea1e7

Please sign in to comment.