From 9584092c4814b63b3808430bb9033634f1421d76 Mon Sep 17 00:00:00 2001 From: liu Date: Mon, 4 Mar 2024 10:19:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E4=B8=BA=E7=9B=B8=E4=BC=BC=E5=AF=B9=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qaKnowledge/QaKnowledgeManageController.java | 9 +++++++++ .../com/supervision/service/impl/AskServiceImpl.java | 2 +- virtual-patient-web/src/main/resources/bootstrap.yml | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/controller/qaKnowledge/QaKnowledgeManageController.java b/virtual-patient-manage/src/main/java/com/supervision/manage/controller/qaKnowledge/QaKnowledgeManageController.java index ded35df5..233a19ca 100644 --- a/virtual-patient-manage/src/main/java/com/supervision/manage/controller/qaKnowledge/QaKnowledgeManageController.java +++ b/virtual-patient-manage/src/main/java/com/supervision/manage/controller/qaKnowledge/QaKnowledgeManageController.java @@ -1,6 +1,7 @@ package com.supervision.manage.controller.qaKnowledge; import com.supervision.dto.QaKnowledgeDTO; +import com.supervision.manage.service.QaKnowledgeManageService; import com.supervision.service.AskTemplateQuestionLibraryService; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; @@ -17,9 +18,17 @@ public class QaKnowledgeManageController { private final AskTemplateQuestionLibraryService askTemplateQuestionLibraryService; + private final QaKnowledgeManageService qaKnowledgeManageService; + @ApiOperation("获取问答知识库") @GetMapping("queryQaKnowledge") public List queryQaKnowledge() { return askTemplateQuestionLibraryService.queryQaKnowledge(); } + + @ApiOperation("手动刷新知识库") + @GetMapping("refreshQaKnowledge") + public void refreshQaKnowledge() { + qaKnowledgeManageService.refreshQaKnowledge(); + } } diff --git a/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java b/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java index ace739a4..84b18b19 100644 --- a/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java +++ b/virtual-patient-web/src/main/java/com/supervision/service/impl/AskServiceImpl.java @@ -126,7 +126,7 @@ public class AskServiceImpl implements AskService { String talkResult = talkQaSimilarity(talkReqVO.getText(), UserUtil.getUser().getId()); // 调用rasa获取文字内容 //String rasaResult = talkRasa(talkReqVO.getText(), UserUtil.getUser().getId()); - log.info("rasa的回复是:{}", talkResult); + log.info("调用对话的回复是:{}", talkResult); TalkResultResVO talkResultResVO = new TalkResultResVO(); // 如果rasa没有识别出来,则返回默认值 if (StrUtil.isBlank(talkResult)) { diff --git a/virtual-patient-web/src/main/resources/bootstrap.yml b/virtual-patient-web/src/main/resources/bootstrap.yml index 09f83caa..993c72e6 100644 --- a/virtual-patient-web/src/main/resources/bootstrap.yml +++ b/virtual-patient-web/src/main/resources/bootstrap.yml @@ -1,5 +1,5 @@ spring: profiles: - active: test + active: dev application: name: virtual-patient-web \ No newline at end of file