Merge branch 'dev/dev_xp' into dev/dev
# Conflicts: # src/main/java/com/ai/da/model/dto/ToProductImageDTO.java
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.ai.da.controller;
|
||||
|
||||
import com.ai.da.common.enums.CreditsEventsEnum;
|
||||
import com.ai.da.common.response.Response;
|
||||
import com.ai.da.model.dto.*;
|
||||
import com.ai.da.model.vo.*;
|
||||
@@ -188,7 +189,28 @@ public class GenerateController {
|
||||
return Response.success(generateService.getImageDescription(path));
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "试用flux")
|
||||
// @GetMapping("/flux")
|
||||
public Response<String> flux(@RequestParam("path") String path,
|
||||
@RequestParam("type") int type,
|
||||
@RequestParam(value = "prompt", required = false) String prompt){
|
||||
CreditsEventsEnum typeEnum = CreditsEventsEnum.RELIGHT;
|
||||
switch (type){
|
||||
case 1:
|
||||
typeEnum = CreditsEventsEnum.TO_PRODUCT_IMAGE;
|
||||
break;
|
||||
case 2:
|
||||
typeEnum = CreditsEventsEnum.IMAGE_TO_SKETCH;
|
||||
break;
|
||||
}
|
||||
return Response.success(generateService.flux(typeEnum, prompt, path));
|
||||
}
|
||||
|
||||
// @ApiOperation(value = "获取flux结果")
|
||||
// @GetMapping("/fluxResult")
|
||||
public Response<String> fluxResult(@RequestParam("taskId") String taskId){
|
||||
return Response.success(generateService.getFluxResult(taskId, 87L));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user