mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 13:07:32 +00:00
@@ -6,14 +6,12 @@ import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
|||||||
import com.tencent.supersonic.chat.agent.Agent;
|
import com.tencent.supersonic.chat.agent.Agent;
|
||||||
import com.tencent.supersonic.chat.agent.AgentConfig;
|
import com.tencent.supersonic.chat.agent.AgentConfig;
|
||||||
import com.tencent.supersonic.chat.agent.AgentToolType;
|
import com.tencent.supersonic.chat.agent.AgentToolType;
|
||||||
import com.tencent.supersonic.chat.agent.DataAnalyticsTool;
|
|
||||||
import com.tencent.supersonic.chat.agent.PluginTool;
|
import com.tencent.supersonic.chat.agent.PluginTool;
|
||||||
import com.tencent.supersonic.chat.agent.RuleParserTool;
|
import com.tencent.supersonic.chat.agent.RuleParserTool;
|
||||||
import com.tencent.supersonic.chat.api.pojo.SchemaElement;
|
import com.tencent.supersonic.chat.api.pojo.SchemaElement;
|
||||||
import com.tencent.supersonic.chat.api.pojo.SchemaElementType;
|
import com.tencent.supersonic.chat.api.pojo.SchemaElementType;
|
||||||
import com.tencent.supersonic.chat.api.pojo.request.QueryFilter;
|
import com.tencent.supersonic.chat.api.pojo.request.QueryFilter;
|
||||||
import com.tencent.supersonic.chat.api.pojo.request.QueryReq;
|
import com.tencent.supersonic.chat.api.pojo.request.QueryReq;
|
||||||
import com.tencent.supersonic.chat.parser.analytics.MetricOption;
|
|
||||||
import com.tencent.supersonic.common.pojo.DateConf;
|
import com.tencent.supersonic.common.pojo.DateConf;
|
||||||
import com.tencent.supersonic.common.pojo.enums.FilterOperatorEnum;
|
import com.tencent.supersonic.common.pojo.enums.FilterOperatorEnum;
|
||||||
|
|
||||||
@@ -155,7 +153,6 @@ public class DataUtils {
|
|||||||
AgentConfig agentConfig = new AgentConfig();
|
AgentConfig agentConfig = new AgentConfig();
|
||||||
agentConfig.getTools().add(getRuleQueryTool());
|
agentConfig.getTools().add(getRuleQueryTool());
|
||||||
agentConfig.getTools().add(getPluginTool());
|
agentConfig.getTools().add(getPluginTool());
|
||||||
agentConfig.getTools().add(getMetricInterpretTool());
|
|
||||||
agent.setAgentConfig(JSONObject.toJSONString(agentConfig));
|
agent.setAgentConfig(JSONObject.toJSONString(agentConfig));
|
||||||
return agent;
|
return agent;
|
||||||
}
|
}
|
||||||
@@ -175,15 +172,4 @@ public class DataUtils {
|
|||||||
return pluginTool;
|
return pluginTool;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static DataAnalyticsTool getMetricInterpretTool() {
|
|
||||||
DataAnalyticsTool metricInterpretTool = new DataAnalyticsTool();
|
|
||||||
metricInterpretTool.setModelId(1L);
|
|
||||||
metricInterpretTool.setType(AgentToolType.ANALYTICS);
|
|
||||||
metricInterpretTool.setMetricOptions(Lists.newArrayList(
|
|
||||||
new MetricOption(1L),
|
|
||||||
new MetricOption(2L),
|
|
||||||
new MetricOption(3L)));
|
|
||||||
return metricInterpretTool;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user