(improvement)(chat) support llm default modelId and fix delete agent tool error (#73)

This commit is contained in:
lexluo09
2023-09-11 23:46:08 +08:00
committed by GitHub
parent eca92d2493
commit 8aedfbb6a0
16 changed files with 480 additions and 231 deletions

View File

@@ -220,6 +220,7 @@ public class ConfigureDemo implements ApplicationListener<ApplicationReadyEvent>
AgentConfig agentConfig = new AgentConfig();
RuleQueryTool ruleQueryTool = new RuleQueryTool();
ruleQueryTool.setType(AgentToolType.RULE);
ruleQueryTool.setId("0");
ruleQueryTool.setModelIds(Lists.newArrayList(-1L));
ruleQueryTool.setQueryModes(Lists.newArrayList(
"METRIC_ENTITY", "METRIC_FILTER", "METRIC_GROUPBY",
@@ -228,6 +229,7 @@ public class ConfigureDemo implements ApplicationListener<ApplicationReadyEvent>
agentConfig.getTools().add(ruleQueryTool);
DslTool dslTool = new DslTool();
dslTool.setId("1");
dslTool.setType(AgentToolType.DSL);
dslTool.setModelIds(Lists.newArrayList(-1L));
agentConfig.getTools().add(dslTool);
@@ -246,6 +248,7 @@ public class ConfigureDemo implements ApplicationListener<ApplicationReadyEvent>
agent.setExamples(Lists.newArrayList("国风风格艺人", "港台地区的艺人", "风格为流行的艺人"));
AgentConfig agentConfig = new AgentConfig();
RuleQueryTool ruleQueryTool = new RuleQueryTool();
ruleQueryTool.setId("0");
ruleQueryTool.setType(AgentToolType.RULE);
ruleQueryTool.setModelIds(Lists.newArrayList(-1L));
ruleQueryTool.setQueryModes(Lists.newArrayList(
@@ -253,6 +256,7 @@ public class ConfigureDemo implements ApplicationListener<ApplicationReadyEvent>
agentConfig.getTools().add(ruleQueryTool);
DslTool dslTool = new DslTool();
dslTool.setId("1");
dslTool.setType(AgentToolType.DSL);
dslTool.setModelIds(Lists.newArrayList(-1L));
agentConfig.getTools().add(dslTool);