From 0a728d3d5d1f50d4302ad06e59627abec442a996 Mon Sep 17 00:00:00 2001 From: jerryjzhang Date: Wed, 9 Oct 2024 20:11:01 +0800 Subject: [PATCH] [improvement][launcher]Update `Text2SQLEval`. --- .../supersonic/evaluation/Text2SQLEval.java | 16 ++++++---------- .../tencent/supersonic/util/LLMConfigUtils.java | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/launchers/standalone/src/test/java/com/tencent/supersonic/evaluation/Text2SQLEval.java b/launchers/standalone/src/test/java/com/tencent/supersonic/evaluation/Text2SQLEval.java index 565e36220..33909ebc3 100644 --- a/launchers/standalone/src/test/java/com/tencent/supersonic/evaluation/Text2SQLEval.java +++ b/launchers/standalone/src/test/java/com/tencent/supersonic/evaluation/Text2SQLEval.java @@ -6,11 +6,7 @@ import com.google.common.collect.Maps; import com.tencent.supersonic.auth.api.authentication.pojo.User; import com.tencent.supersonic.chat.BaseTest; import com.tencent.supersonic.chat.api.pojo.response.QueryResult; -import com.tencent.supersonic.chat.server.agent.Agent; -import com.tencent.supersonic.chat.server.agent.AgentToolType; -import com.tencent.supersonic.chat.server.agent.MultiTurnConfig; -import com.tencent.supersonic.chat.server.agent.RuleParserTool; -import com.tencent.supersonic.chat.server.agent.ToolConfig; +import com.tencent.supersonic.chat.server.agent.*; import com.tencent.supersonic.chat.server.pojo.ChatModel; import com.tencent.supersonic.common.pojo.enums.ChatModelType; import com.tencent.supersonic.util.DataUtils; @@ -152,11 +148,11 @@ public class Text2SQLEval extends BaseTest { return agent; } - private RuleParserTool getLLMQueryTool() { - RuleParserTool ruleQueryTool = new RuleParserTool(); - ruleQueryTool.setType(AgentToolType.NL2SQL_LLM); - ruleQueryTool.setDataSetIds(Lists.newArrayList(-1L)); + private static LLMParserTool getLLMQueryTool() { + LLMParserTool llmParserTool = new LLMParserTool(); + llmParserTool.setType(AgentToolType.NL2SQL_LLM); + llmParserTool.setDataSetIds(Lists.newArrayList(-1L)); - return ruleQueryTool; + return llmParserTool; } } diff --git a/launchers/standalone/src/test/java/com/tencent/supersonic/util/LLMConfigUtils.java b/launchers/standalone/src/test/java/com/tencent/supersonic/util/LLMConfigUtils.java index 2ec8632ee..300457bd9 100644 --- a/launchers/standalone/src/test/java/com/tencent/supersonic/util/LLMConfigUtils.java +++ b/launchers/standalone/src/test/java/com/tencent/supersonic/util/LLMConfigUtils.java @@ -8,7 +8,7 @@ public class LLMConfigUtils { false), OPENAI_GLM( false), OLLAMA_LLAMA3(true), OLLAMA_QWEN2(true), OLLAMA_QWEN25(true); - private boolean isOllam; + public boolean isOllam; LLMType(boolean isOllam) { this.isOllam = isOllam;