4 Commits

Author SHA1 Message Date
QJ_wonder
86651a2b10 Merge fa65b6eff7 into 62b9db6791 2025-07-15 11:25:51 +08:00
WDEP
62b9db6791 (fix)(webapp) 修改页面不显示推荐下钻维度问题 (#2332)
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled
2025-07-15 10:17:22 +08:00
wangyong
6d907b6adf (fix)(headless-chat) 修复EmbeddingMatchStrategy.detectByBatch() NPE异常,当chatQueryContext.getRequest().getChatAppConfig()为null (#2333) 2025-07-15 10:17:03 +08:00
wangyong
da172a030e (fix)(headless-chat) 修复FileHandlerImpl.convert2Resp() 纬度值数据行首字符为空格时异常 (#2336) 2025-07-15 10:16:46 +08:00
3 changed files with 10 additions and 4 deletions

View File

@@ -175,6 +175,7 @@ public class FileHandlerImpl implements FileHandler {
private DictValueResp convert2Resp(String lineStr) {
DictValueResp dictValueResp = new DictValueResp();
if (StringUtils.isNotEmpty(lineStr)) {
lineStr=StringUtils.stripStart(lineStr,null);
String[] itemArray = lineStr.split("\\s+");
if (Objects.nonNull(itemArray) && itemArray.length >= 3) {
dictValueResp.setValue(itemArray[0].replace("#", " "));

View File

@@ -3,6 +3,7 @@ package com.tencent.supersonic.headless.chat.mapper;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.hankcs.hanlp.seg.common.Term;
import com.tencent.supersonic.common.pojo.ChatModelConfig;
import com.tencent.supersonic.headless.api.pojo.response.S2Term;
import com.tencent.supersonic.headless.chat.ChatQueryContext;
import com.tencent.supersonic.headless.chat.knowledge.EmbeddingResult;
@@ -167,9 +168,13 @@ public class EmbeddingMatchStrategy extends BatchMatchStrategy<EmbeddingResult>
variable.put("retrievedInfo", JSONObject.toJSONString(results));
Prompt prompt = PromptTemplate.from(LLM_FILTER_PROMPT).apply(variable);
ChatLanguageModel chatLanguageModel =
ModelProvider.getChatModel(chatQueryContext.getRequest().getChatAppConfig()
.get("REWRITE_MULTI_TURN").getChatModelConfig());
ChatModelConfig chatModelConfig=null;
if(chatQueryContext.getRequest().getChatAppConfig()!=null
&& chatQueryContext.getRequest().getChatAppConfig().containsKey("REWRITE_MULTI_TURN")){
chatModelConfig=chatQueryContext.getRequest().getChatAppConfig().get("REWRITE_MULTI_TURN").getChatModelConfig();
}
ChatLanguageModel chatLanguageModel = ModelProvider.getChatModel(chatModelConfig);
String response = chatLanguageModel.generate(prompt.toUserMessage().singleText());
if (StringUtils.isBlank(response)) {

View File

@@ -367,7 +367,7 @@ const ChatMsg: React.FC<Props> = ({
entityName !== undefined;
const existDrillDownDimension =
queryMode.includes('METRIC') &&
(queryMode.includes('METRIC') || queryMode === 'LLM_S2SQL')&&
getMsgContentType() !== MsgContentTypeEnum.TEXT &&
!isEntityMode;