TASK: 生成项目参数 参数变更

This commit is contained in:
2025-07-02 15:06:52 +08:00
parent 1f824f3ae6
commit e8ad241653
3 changed files with 58 additions and 38 deletions

View File

@@ -4402,7 +4402,7 @@ public class PythonService {
throw new BusinessException("poseTransferBatch.interface.exception");
}
public JSONObject getProjectParam(String prompt, String fileUrl, List<String> imageUrlList) {
public JSONObject getProjectParam(String prompt, String fileUrl, List<String> imageUrlList, String process) {
OkHttpClient client = new OkHttpClient().newBuilder()
.connectTimeout(30, TimeUnit.SECONDS)
.pingInterval(5, TimeUnit.SECONDS)//websocket轮训间隔(单位:秒)
@@ -4412,6 +4412,7 @@ public class PythonService {
MediaType mediaType = MediaType.parse("application/json");
Map<String, Object> content = Maps.newHashMap();
content.put("prompt", prompt);
content.put("process", process);
content.put("image_list", !CollectionUtils.isEmpty(imageUrlList) ? imageUrlList : new ArrayList<>());
content.put("file_list", !StringUtils.isEmpty(fileUrl) ? Collections.singletonList(fileUrl) : new ArrayList<>());
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content));