TASK:1、将imageToSketch接口调用转为异步 2、imageToSketch加入flux

This commit is contained in:
2025-06-13 16:37:45 +08:00
parent b6993b04c2
commit 174d1bf0d0
8 changed files with 180 additions and 56 deletions

View File

@@ -87,7 +87,7 @@ public class GenerateController {
@ApiOperation(value = "imageToSketch")
@PostMapping("/imageToSketch")
public Response<GenerateResultVO> imageToSketch(@Valid @RequestBody ImageToSketchDTO imageToSketchDTO) {
public Response<String> imageToSketch(@Valid @RequestBody ImageToSketchDTO imageToSketchDTO) {
return Response.success(generateService.imageToSketchAsync(imageToSketchDTO, null, null));
// return Response.success(generateService.imageToSketch(imageToSketchDTO, null, null));
}
@@ -209,7 +209,7 @@ public class GenerateController {
// @ApiOperation(value = "获取flux结果")
// @GetMapping("/fluxResult")
public Response<String> fluxResult(@RequestParam("taskId") String taskId){
return Response.success(generateService.getFluxResult(taskId, 87L));
return Response.success(generateService.getFluxResult(taskId, "87/" + taskId + ".png"));
}