mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-26 18:24:20 +08:00
[release](project)update version 0.7.4 backend (#66)
This commit is contained in:
@@ -14,9 +14,11 @@ import com.tencent.supersonic.chat.api.pojo.request.ChatDetailConfigReq;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.ExecuteQueryReq;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.ItemVisibility;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.QueryReq;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.KnowledgeInfoReq;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.RecommendedQuestionReq;
|
||||
import com.tencent.supersonic.chat.api.pojo.response.ParseResp;
|
||||
import com.tencent.supersonic.chat.plugin.Plugin;
|
||||
import com.tencent.supersonic.chat.plugin.PluginParseConfig;
|
||||
import com.tencent.supersonic.chat.query.plugin.ParamOption;
|
||||
import com.tencent.supersonic.chat.query.plugin.WebBase;
|
||||
import com.tencent.supersonic.chat.service.QueryService;
|
||||
@@ -119,6 +121,16 @@ public class ConfigureDemo implements ApplicationListener<ApplicationReadyEvent>
|
||||
chatAggConfig.setChatDefaultConfig(chatDefaultConfigAgg);
|
||||
ItemVisibility visibility1 = new ItemVisibility();
|
||||
chatAggConfig.setVisibility(visibility1);
|
||||
List<KnowledgeInfoReq> knowledgeInfos = new ArrayList<>();
|
||||
KnowledgeInfoReq knowledgeInfoReq = new KnowledgeInfoReq();
|
||||
knowledgeInfoReq.setItemId(1L);
|
||||
knowledgeInfoReq.setSearchEnable(true);
|
||||
knowledgeInfos.add(knowledgeInfoReq);
|
||||
KnowledgeInfoReq knowledgeInfoReq2 = new KnowledgeInfoReq();
|
||||
knowledgeInfoReq2.setItemId(2L);
|
||||
knowledgeInfoReq2.setSearchEnable(true);
|
||||
knowledgeInfos.add(knowledgeInfoReq2);
|
||||
chatAggConfig.setKnowledgeInfos(knowledgeInfos);
|
||||
chatConfigBaseReq.setChatAggConfig(chatAggConfig);
|
||||
|
||||
List<RecommendedQuestionReq> recommendedQuestions = new ArrayList<>();
|
||||
@@ -170,13 +182,18 @@ public class ConfigureDemo implements ApplicationListener<ApplicationReadyEvent>
|
||||
configService.addConfig(chatConfigBaseReq, user);
|
||||
}
|
||||
|
||||
|
||||
private void addPlugin_1() {
|
||||
Plugin plugin1 = new Plugin();
|
||||
plugin1.setType("WEB_PAGE");
|
||||
plugin1.setModelList(Arrays.asList(1L));
|
||||
plugin1.setPattern("用于分析超音数的流量概况,包含UV、PV等核心指标的追踪。P.S. 仅作为示例展示,无实际看板");
|
||||
plugin1.setParseModeConfig(null);
|
||||
plugin1.setName("超音数流量分析看板");
|
||||
PluginParseConfig pluginParseConfig = new PluginParseConfig();
|
||||
pluginParseConfig.setDescription(plugin1.getPattern());
|
||||
pluginParseConfig.setName(plugin1.getName());
|
||||
pluginParseConfig.setExamples(Lists.newArrayList("tom最近访问超音数情况怎么样"));
|
||||
plugin1.setParseModeConfig(JSONObject.toJSONString(pluginParseConfig));
|
||||
WebBase webBase = new WebBase();
|
||||
webBase.setUrl("www.yourbi.com");
|
||||
ParamOption paramOption = new ParamOption();
|
||||
@@ -198,8 +215,8 @@ public class ConfigureDemo implements ApplicationListener<ApplicationReadyEvent>
|
||||
agent.setDescription("帮助您用自然语言查询指标,支持时间限定、条件筛选、下钻维度以及聚合统计");
|
||||
agent.setStatus(1);
|
||||
agent.setEnableSearch(1);
|
||||
agent.setExamples(Lists.newArrayList("超音数访问次数", "近15天超音数访问次数汇总",
|
||||
"按部门统计超音数的访问人数", "对比alice和lucy的停留时长", "超音数访问次数最高的部门"));
|
||||
agent.setExamples(Lists.newArrayList("超音数访问次数", "近15天超音数访问次数汇总", "按部门统计超音数的访问人数",
|
||||
"对比alice和lucy的停留时长", "超音数访问次数最高的部门"));
|
||||
AgentConfig agentConfig = new AgentConfig();
|
||||
RuleQueryTool ruleQueryTool = new RuleQueryTool();
|
||||
ruleQueryTool.setType(AgentToolType.RULE);
|
||||
|
||||
@@ -38,3 +38,7 @@ mybatis:
|
||||
|
||||
llm:
|
||||
url: http://127.0.0.1:9092
|
||||
embedding:
|
||||
url: http://127.0.0.1:9092
|
||||
functionCall:
|
||||
url: http://127.0.0.1:9092
|
||||
|
||||
@@ -117,6 +117,7 @@ CREATE TABLE IF NOT EXISTS `s2_model` (
|
||||
`name` varchar(255) DEFAULT NULL , -- domain name
|
||||
`biz_name` varchar(255) DEFAULT NULL , -- internal name
|
||||
`domain_id` INT DEFAULT '0' , -- parent domain ID
|
||||
`alias` varchar(255) DEFAULT NULL , -- internal name
|
||||
`created_at` TIMESTAMP DEFAULT NULL ,
|
||||
`created_by` varchar(100) DEFAULT NULL ,
|
||||
`updated_at` TIMESTAMP DEFAULT NULL ,
|
||||
@@ -392,7 +393,21 @@ CREATE TABLE IF NOT EXISTS `singer` (
|
||||
);
|
||||
COMMENT ON TABLE singer IS 'singer_info';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_dictionary_task` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL , -- task name
|
||||
`description` varchar(255) ,
|
||||
`command`LONGVARCHAR NOT NULL , -- task Request Parameters
|
||||
`command_md5` varchar(255) NOT NULL , -- task Request Parameters md5
|
||||
`status` INT NOT NULL , -- the final status of the task
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
|
||||
`created_by` varchar(100) NOT NULL ,
|
||||
`progress` DOUBLE default 0.00 , -- task real-time progress
|
||||
`elapsed_ms` bigINT DEFAULT NULL , -- the task takes time in milliseconds
|
||||
`message` LONGVARCHAR , -- remark related information
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT ON TABLE s2_dictionary_task IS 'dictionary task information table';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,4 +45,8 @@ alter table s2_database add column viewer varchar(500);
|
||||
alter table s2_database drop column domain_id;
|
||||
|
||||
--20230831
|
||||
alter table s2_chat add column agent_id int after chat_id;
|
||||
alter table s2_chat add column agent_id int after chat_id;
|
||||
|
||||
--20230907
|
||||
|
||||
ALTER TABLE s2_model add alias varchar(200) default null after domain_id;
|
||||
@@ -1,18 +1,10 @@
|
||||
#hanlp mapper helper
|
||||
|
||||
one.detection.size=8
|
||||
one.detection.max.size=20
|
||||
metric.dimension.min.threshold=0.3
|
||||
metric.dimension.threshold=0.3
|
||||
dimension.value.threshold=0.5
|
||||
|
||||
function.bonus.threshold=201
|
||||
|
||||
#SatisfactionChecker
|
||||
long.text.threshold=0.8
|
||||
short.text.threshold=0.5
|
||||
query.text.length.threshold=10
|
||||
|
||||
|
||||
candidate.threshold=0.2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user