[improvement][launcher]Update Text2SQLEval.

This commit is contained in:
jerryjzhang
2024-10-09 20:11:01 +08:00
parent 809898e786
commit 0a728d3d5d
2 changed files with 7 additions and 11 deletions

View File

@@ -6,11 +6,7 @@ import com.google.common.collect.Maps;
import com.tencent.supersonic.auth.api.authentication.pojo.User; import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.chat.BaseTest; import com.tencent.supersonic.chat.BaseTest;
import com.tencent.supersonic.chat.api.pojo.response.QueryResult; import com.tencent.supersonic.chat.api.pojo.response.QueryResult;
import com.tencent.supersonic.chat.server.agent.Agent; import com.tencent.supersonic.chat.server.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.pojo.ChatModel; import com.tencent.supersonic.chat.server.pojo.ChatModel;
import com.tencent.supersonic.common.pojo.enums.ChatModelType; import com.tencent.supersonic.common.pojo.enums.ChatModelType;
import com.tencent.supersonic.util.DataUtils; import com.tencent.supersonic.util.DataUtils;
@@ -152,11 +148,11 @@ public class Text2SQLEval extends BaseTest {
return agent; return agent;
} }
private RuleParserTool getLLMQueryTool() { private static LLMParserTool getLLMQueryTool() {
RuleParserTool ruleQueryTool = new RuleParserTool(); LLMParserTool llmParserTool = new LLMParserTool();
ruleQueryTool.setType(AgentToolType.NL2SQL_LLM); llmParserTool.setType(AgentToolType.NL2SQL_LLM);
ruleQueryTool.setDataSetIds(Lists.newArrayList(-1L)); llmParserTool.setDataSetIds(Lists.newArrayList(-1L));
return ruleQueryTool; return llmParserTool;
} }
} }

View File

@@ -8,7 +8,7 @@ public class LLMConfigUtils {
false), OPENAI_GLM( false), OPENAI_GLM(
false), OLLAMA_LLAMA3(true), OLLAMA_QWEN2(true), OLLAMA_QWEN25(true); false), OLLAMA_LLAMA3(true), OLLAMA_QWEN2(true), OLLAMA_QWEN25(true);
private boolean isOllam; public boolean isOllam;
LLMType(boolean isOllam) { LLMType(boolean isOllam) {
this.isOllam = isOllam; this.isOllam = isOllam;