(improvement)(chat) Add showcase demo (#670)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-01-19 23:14:16 +08:00
committed by GitHub
parent add74b9589
commit a375a922c2
2 changed files with 7 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ public class SysParameter {
//parse config
parameters.add(new Parameter("parse.show.count", "3",
"parseShowCount", "前端展示的解析个数",
"解析结果个数", "前端展示的解析个数",
"number", "Parser相关配置"));
}

View File

@@ -93,6 +93,8 @@ public class ChatDemoLoader implements CommandLineRunner {
addAgent3();
addSampleChats();
addSampleChats2();
updateQueryScore(1);
updateQueryScore(4);
} catch (Exception e) {
log.error("Failed to add sample chats", e);
}
@@ -506,6 +508,10 @@ public class ChatDemoLoader implements CommandLineRunner {
agentService.createAgent(agent, User.getFakeUser());
}
private void updateQueryScore(Integer queryId) {
chatService.updateFeedback(queryId, 5, "");
}
private boolean checkEnable() {
if (!demoEnabled) {
return false;