mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(chat|common|headless|webapp) 结果分析,改写伪流式输出,加快响应速度 (#2395)
This commit is contained in:
@@ -117,9 +117,17 @@ public class MultiCustomDictionary extends DynamicCustomDictionary {
|
||||
dictWord.setAlias(word.toLowerCase());
|
||||
String[] split = nature.split(DictWordType.NATURE_SPILT);
|
||||
if (split.length >= 2) {
|
||||
Long dimId = Long.parseLong(
|
||||
nature.split(DictWordType.NATURE_SPILT)[split.length - 1]);
|
||||
KnowledgeBaseService.addDimValueAlias(dimId, Arrays.asList(dictWord));
|
||||
try {
|
||||
Long dimId = Long.parseLong(
|
||||
nature.split(DictWordType.NATURE_SPILT)[split.length - 1]);
|
||||
KnowledgeBaseService.addDimValueAlias(dimId,
|
||||
Arrays.asList(dictWord));
|
||||
} catch (NumberFormatException e) {
|
||||
logger.warning(path + " : 非标准文件,不存入KnowledgeBaseService");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user