mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
(improvement)(headless | chat |webapp) (#2266)
1 在使用多轮对话改写时,内容上面的问题,替换成改写的内容,可以让用户知道该回答原来什么问题 2 解决表格内容太长导致显示的问题 3 框架的字典都是以_开头的, 添加判断,如果配置了非 _ 开头的字典而引起的报错 4 大模型分析结果时,因为textResult 是必填的参数,所以如果发现 textResult 未null 就不做分析了
This commit is contained in:
@@ -179,13 +179,15 @@ public class NatureHelper {
|
||||
}
|
||||
|
||||
public static Long parseIdFromNature(String nature, int index) {
|
||||
try {
|
||||
String[] split = nature.split(DictWordType.NATURE_SPILT);
|
||||
if (split.length > index) {
|
||||
return Long.valueOf(split[index]);
|
||||
if(nature.startsWith("_")){ // 框架的字典都是以_开头的
|
||||
try {
|
||||
String[] split = nature.split(DictWordType.NATURE_SPILT);
|
||||
if (split.length > index) {
|
||||
return Long.valueOf(split[index]);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.error("Error parsing long from nature: {}", nature, e);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.error("Error parsing long from nature: {}", nature, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user