(improvement)(headless | chat |webapp) (#2266)
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

1  在使用多轮对话改写时,内容上面的问题,替换成改写的内容,可以让用户知道该回答原来什么问题
2  解决表格内容太长导致显示的问题
3  框架的字典都是以_开头的, 添加判断,如果配置了非 _ 开头的字典而引起的报错
4  大模型分析结果时,因为textResult 是必填的参数,所以如果发现 textResult 未null 就不做分析了
This commit is contained in:
guilinlewis
2025-05-26 21:25:43 +08:00
committed by GitHub
parent dff64b62f4
commit b9dd6bb7c5
4 changed files with 19 additions and 11 deletions

View File

@@ -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;
}