mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 06:27:21 +00:00
[improvement][chat]Introduce AllFieldMapper to increase parsing robustness when normal pipeline fails.
[improvement][chat]Introduce `AllFieldMapper` to increase parsing robustness when normal pipeline fails.
This commit is contained in:
@@ -4,8 +4,9 @@ com.tencent.supersonic.headless.chat.mapper.SchemaMapper=\
|
||||
com.tencent.supersonic.headless.chat.mapper.EmbeddingMapper, \
|
||||
com.tencent.supersonic.headless.chat.mapper.KeywordMapper, \
|
||||
com.tencent.supersonic.headless.chat.mapper.QueryFilterMapper, \
|
||||
com.tencent.supersonic.headless.chat.mapper.TimeFieldMapper,\
|
||||
com.tencent.supersonic.headless.chat.mapper.TermDescMapper
|
||||
com.tencent.supersonic.headless.chat.mapper.PartitionTimeMapper,\
|
||||
com.tencent.supersonic.headless.chat.mapper.TermDescMapper,\
|
||||
com.tencent.supersonic.headless.chat.mapper.AllFieldMapper
|
||||
|
||||
com.tencent.supersonic.headless.chat.parser.SemanticParser=\
|
||||
com.tencent.supersonic.headless.chat.parser.llm.LLMSqlParser,\
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
import org.junitpioneer.jupiter.SetSystemProperty;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
|
||||
import java.util.List;
|
||||
@@ -95,6 +96,7 @@ public class Text2SQLEval extends BaseTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SetSystemProperty(key = "s2.test", value = "true")
|
||||
public void test_drilldown_and_topN() throws Exception {
|
||||
long start = System.currentTimeMillis();
|
||||
QueryResult result = submitNewChat("过去30天访问次数最高的部门top3", agent.getId());
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.tencent.supersonic.headless.api.pojo.response.SemanticQueryResp;
|
||||
import com.tencent.supersonic.util.DataUtils;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junitpioneer.jupiter.SetSystemProperty;
|
||||
|
||||
import static java.time.LocalDate.now;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -29,6 +30,7 @@ public class QueryBySqlTest extends BaseTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SetSystemProperty(key = "s2.test", value = "true")
|
||||
public void testSumQuery() throws Exception {
|
||||
SemanticQueryResp semanticQueryResp =
|
||||
queryBySql("SELECT SUM(访问次数) AS 总访问次数 FROM 超音数PVUV统计 ");
|
||||
|
||||
Reference in New Issue
Block a user