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