1 Commits

Author SHA1 Message Date
QJ_wonder
2f4f2027a5 Merge fa65b6eff7 into 47c2595fb8 2025-07-10 10:13:55 +08:00
3 changed files with 4 additions and 10 deletions

View File

@@ -175,7 +175,6 @@ 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,7 +3,6 @@ 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;
@@ -168,13 +167,9 @@ public class EmbeddingMatchStrategy extends BatchMatchStrategy<EmbeddingResult>
variable.put("retrievedInfo", JSONObject.toJSONString(results));
Prompt prompt = PromptTemplate.from(LLM_FILTER_PROMPT).apply(variable);
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);
ChatLanguageModel chatLanguageModel =
ModelProvider.getChatModel(chatQueryContext.getRequest().getChatAppConfig()
.get("REWRITE_MULTI_TURN").getChatModelConfig());
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 === 'LLM_S2SQL')&&
queryMode.includes('METRIC') &&
getMsgContentType() !== MsgContentTypeEnum.TEXT &&
!isEntityMode;