mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
[improvement][headless-chat]Prioritize LLMSqlParser over RuleSqlParser.
This commit is contained in:
@@ -16,6 +16,7 @@ import static com.tencent.supersonic.headless.chat.parser.ParserConfig.PARSER_TE
|
||||
* by current candidate queries. If so, current parser could be skipped.
|
||||
*/
|
||||
@Slf4j
|
||||
@Deprecated
|
||||
public class SatisfactionChecker {
|
||||
|
||||
// check all the parse info in candidate
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.tencent.supersonic.headless.api.pojo.SchemaElementType;
|
||||
import com.tencent.supersonic.headless.api.pojo.SemanticSchema;
|
||||
import com.tencent.supersonic.headless.chat.ChatQueryContext;
|
||||
import com.tencent.supersonic.headless.chat.parser.ParserConfig;
|
||||
import com.tencent.supersonic.headless.chat.parser.SatisfactionChecker;
|
||||
import com.tencent.supersonic.headless.chat.query.llm.s2sql.LLMReq;
|
||||
import com.tencent.supersonic.headless.chat.query.llm.s2sql.LLMResp;
|
||||
import com.tencent.supersonic.headless.chat.utils.ComponentFactory;
|
||||
@@ -40,11 +39,6 @@ public class LLMRequestService {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (SatisfactionChecker.isSkip(queryCtx)) {
|
||||
log.info("skip {}, queryText:{}", LLMSqlParser.class, queryCtx.getQueryText());
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ public class RuleSqlParser implements SemanticParser {
|
||||
|
||||
@Override
|
||||
public void parse(ChatQueryContext chatQueryContext) {
|
||||
if (!chatQueryContext.getText2SQLType().enableRule()) {
|
||||
if (!chatQueryContext.getText2SQLType().enableRule()
|
||||
|| !chatQueryContext.getCandidateQueries().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
SchemaMapInfo mapInfo = chatQueryContext.getMapInfo();
|
||||
|
||||
Reference in New Issue
Block a user