rasa : 去除modelId

dev_2.0.0
xueqingkun 1 year ago
parent 7ebc5e6276
commit 55914c5b05

@ -1,5 +1,6 @@
package com.supervision.vo.rasa;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ -17,6 +18,7 @@ public class RasaTalkVo {
/**
* id
*/
@ApiModelProperty(hidden = true)
private String modelId;
}

@ -26,15 +26,12 @@ public class RasaFileController {
@ApiOperation("接受并保存rasa文件")
@PostMapping("/saveRasaFile")
public String saveRasaFile(@RequestParam("file") MultipartFile file, @RequestParam("modelId") String modelId) throws IOException {
public String saveRasaFile(@RequestParam("file") MultipartFile file) throws IOException {
if (file == null || file.isEmpty()) {
throw new BusinessException("file is empty");
}
if (StrUtil.isEmpty(modelId)){
throw new BusinessException("modelId is empty");
}
rasaFileService.saveRasaFile(file,modelId);
rasaFileService.saveRasaFile(file,"1");
return "success";
}

@ -1,6 +1,8 @@
package com.supervision.rasa.pojo.vo;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import java.util.Date;
@ -10,6 +12,7 @@ public class RasaCmdArgumentVo {
private String fixedModelName;//fixed-model-name
@ApiModelProperty(hidden = true)
private String modelId;
public void setFixedModelNameIfAbsent(){

@ -29,9 +29,6 @@ public class RasaTalkServiceImpl implements RasaTalkService {
@Override
public List<String> talkRasa(RasaTalkVo rasaTalkVo) {
if (StrUtil.isEmpty(rasaTalkVo.getModelId())){
throw new BusinessException("modelId is not allow empty ");
}
RasaModelInfo rasaModelInfo = rasaModeService.queryByModelId("1");
RasaReqDTO rasaReqDTO = new RasaReqDTO();

Loading…
Cancel
Save