(fix)(chat&headless)Agent references ChatModelConfig instead of ModelConfig.

This commit is contained in:
jerryjzhang
2024-07-12 11:58:38 +08:00
parent 37da1ac2ae
commit 5bf4a4160d
12 changed files with 37 additions and 36 deletions

View File

@@ -141,7 +141,6 @@ public class S2VisitsDemo extends S2BaseDemo {
chatService.parseAndExecute(chatId.intValue(), agentId, "按部门统计");
chatService.parseAndExecute(chatId.intValue(), agentId, "查询近30天");
chatService.parseAndExecute(chatId.intValue(), agentId, "alice 停留时长");
chatService.parseAndExecute(chatId.intValue(), agentId, "对比alice和lucy访问次数");
chatService.parseAndExecute(chatId.intValue(), agentId, "访问次数最高的部门");
}

View File

@@ -9,7 +9,6 @@ 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.common.config.ChatModelConfig;
import com.tencent.supersonic.common.config.ModelConfig;
import com.tencent.supersonic.headless.api.pojo.response.QueryResult;
import com.tencent.supersonic.util.DataUtils;
import org.junit.jupiter.api.BeforeAll;
@@ -109,7 +108,7 @@ public class Text2SQLEval extends BaseTest {
GLM
}
private static ModelConfig getLLMConfig(LLMType type) {
private static ChatModelConfig getLLMConfig(LLMType type) {
String baseUrl;
String apiKey;
String modelName;
@@ -151,9 +150,7 @@ public class Text2SQLEval extends BaseTest {
chatModel.setTemperature(temperature);
chatModel.setProvider("open_ai");
ModelConfig modelConfig = new ModelConfig();
modelConfig.setChatModel(chatModel);
return modelConfig;
return chatModel;
}
}