|
|
|
@ -167,15 +167,14 @@ public class ModelCaseServiceImpl extends ServiceImpl<ModelCaseMapper, ModelCase
|
|
|
|
|
casePersonService.saveCaseActor(modelCase.getId(), modelCaseBase.getCaseActorName(), modelCaseBase.getCaseActorIdCard());
|
|
|
|
|
caseEvidenceService.initCaseEvidenceDirectory(modelCase.getId(), modelCase.getCaseType());
|
|
|
|
|
|
|
|
|
|
// todo:上线需要打开
|
|
|
|
|
// // 这里需要调用知识库的接口,去保存知识库
|
|
|
|
|
// CreateBaseDTO createBaseDTO = new CreateBaseDTO();
|
|
|
|
|
// createBaseDTO.setKnowledge_base_name(modelCase.getCaseNo());
|
|
|
|
|
// LangChainChatRes chat = langChainChatService.createBase(createBaseDTO);
|
|
|
|
|
// log.info("创建知识库:{}", chat);
|
|
|
|
|
// if (200 != chat.getCode()) {
|
|
|
|
|
// throw new BusinessException("保存知识库失败");
|
|
|
|
|
// }
|
|
|
|
|
// 这里需要调用知识库的接口,去保存知识库
|
|
|
|
|
CreateBaseDTO createBaseDTO = new CreateBaseDTO();
|
|
|
|
|
createBaseDTO.setKnowledge_base_name(modelCase.getCaseNo());
|
|
|
|
|
LangChainChatRes chat = langChainChatService.createBase(createBaseDTO);
|
|
|
|
|
log.info("创建知识库:{}", chat);
|
|
|
|
|
if (200 != chat.getCode()) {
|
|
|
|
|
throw new BusinessException("保存知识库失败");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i > 0) {
|
|
|
|
|
return R.okMsg("保存成功");
|
|
|
|
|