代码提交

topo_dev
liu 9 months ago
parent b5ef604f49
commit 85261f4995

@ -10,4 +10,10 @@ public class CreateBaseDTO {
private String vector_store_type = "faiss";
private String embed_model = "bge-large-zh";
public static CreateBaseDTO create(String knowledge_base_name){
CreateBaseDTO createBaseDTO = new CreateBaseDTO();
createBaseDTO.setKnowledge_base_name(knowledge_base_name);
return createBaseDTO;
}
}

@ -7,12 +7,15 @@ import com.supervision.chat.client.LangChainChatService;
import com.supervision.chat.client.dto.CreateBaseDTO;
import com.supervision.chat.client.dto.DeleteFileDTO;
import com.supervision.chat.client.dto.LangChainChatRes;
import com.supervision.police.domain.ModelCase;
import com.supervision.police.service.ModelCaseService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.List;
@Slf4j
@RequestMapping("chat/test/")
@ -22,6 +25,8 @@ public class TestController {
private final LangChainChatService langChainChatClient;
private final ModelCaseService modelCaseService;
@GetMapping("test")
public void test() {
CreateBaseDTO createBaseDTO = new CreateBaseDTO();
@ -30,6 +35,15 @@ public class TestController {
log.info(JSONUtil.toJsonStr(chat));
}
@GetMapping("createExistCase")
public void createExistCase(){
List<ModelCase> list = modelCaseService.list();
for (ModelCase modelCase : list) {
LangChainChatRes chat = langChainChatClient.createBase(CreateBaseDTO.create(modelCase.getCaseNo()));
log.info(JSONUtil.toJsonStr(chat));
}
}
@PostMapping("uploadFile")
public void testUploadFile(@RequestPart("file") MultipartFile file) throws IOException {
CustomMultipartFile mockMultipartFile = new CustomMultipartFile(file.getOriginalFilename(), file.getInputStream());

@ -148,7 +148,7 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
}
// 创建任务之后,再开始
boolean taskStatus = saveRecordProcessTask(record.getCaseId(), record.getId());
// 如果校验结果为false,则说明需要进行分类以及三元组操作
// 如果校验结果为true,则说明需要进行分类以及三元组操作
if (taskStatus) {
// 对笔录进行分类,并对笔录进行提取三元组
recordSplitProcessService.process(allTypeList, splitList);

@ -45,7 +45,7 @@ public class RecordSplitTypeServiceImpl implements RecordSplitTypeService {
log.error("分类任务线程休眠失败");
}
List<Future<String>> futures = new ArrayList<>();
log.info("开始执行笔录分类任务");
for (NoteRecordSplit recordSplit : splitList) {
// 进行分类
log.info("分类任务提交线程池进行分类");

Loading…
Cancel
Save